Skip to content

Commit 56a41c2

Browse files
committed
MatShell: avoid multiple calls to delete user->op
1 parent 81b32dc commit 56a41c2

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

plugin/mpi/PETSc-code.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1066,6 +1066,7 @@ namespace PETSc {
10661066
PetscBool assembled;
10671067
MatAssembled(ptB->_petsc, &assembled);
10681068
MatDuplicate(ptB->_petsc, assembled ? MAT_COPY_VALUES : MAT_DO_NOT_COPY_VALUES, &ptA->_petsc);
1069+
MatShellSetOperation(ptB->_petsc, MATOP_DESTROY, NULL);
10691070
MatDestroy(&ptB->_petsc);
10701071
}
10711072
} else

0 commit comments

Comments
 (0)