Commits

Lisandro Dalcin  committed 3cfad3a

Quick fix for IGAAxisCopy()

  • Participants
  • Parent commits e97d45e

Comments (0)

Files changed (1)

File src/petigaaxis.c

   PetscFunctionBegin;
   PetscValidPointer(base,1);
   PetscValidPointer(axis,2);
+  if(base == axis) PetscFunctionReturn(0);
+
   axis->periodic = base->periodic;
   axis->p = base->p;
   axis->m = base->m;
   ierr = PetscFree(axis->U);CHKERRQ(ierr);
   ierr = PetscMalloc((axis->m+1)*sizeof(PetscReal),&axis->U);CHKERRQ(ierr);
   ierr = PetscMemcpy(axis->U,base->U,(axis->m+1)*sizeof(PetscReal));CHKERRQ(ierr);
+
+  axis->nel = axis->nnp = 0;
+  ierr = PetscFree(axis->span);CHKERRQ(ierr);
+
   PetscFunctionReturn(0);
 }