[cig-commits] r21646 - short/3D/PyLith/trunk/libsrc/pylith/topology
brad at geodynamics.org
brad at geodynamics.org
Tue Mar 26 15:45:42 PDT 2013
Author: brad
Date: 2013-03-26 15:45:42 -0700 (Tue, 26 Mar 2013)
New Revision: 21646
Modified:
short/3D/PyLith/trunk/libsrc/pylith/topology/VisitorSubMesh.icc
Log:
Fixed small bug in deallocation for SubMeshIS.
Modified: short/3D/PyLith/trunk/libsrc/pylith/topology/VisitorSubMesh.icc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/topology/VisitorSubMesh.icc 2013-03-26 22:41:06 UTC (rev 21645)
+++ short/3D/PyLith/trunk/libsrc/pylith/topology/VisitorSubMesh.icc 2013-03-26 22:45:42 UTC (rev 21646)
@@ -284,8 +284,10 @@
pylith::topology::SubMeshIS::deallocate(void)
{ // deallocate
PetscErrorCode err;
- err = ISRestoreIndices(_indexSet, &_points);CHECK_PETSC_ERROR(err);_points=NULL;
- err = ISDestroy(&_indexSet);CHECK_PETSC_ERROR(err);assert(!_indexSet);
+ if (_indexSet) {
+ err = ISRestoreIndices(_indexSet, &_points);CHECK_PETSC_ERROR(err);_points=NULL;
+ err = ISDestroy(&_indexSet);CHECK_PETSC_ERROR(err);assert(!_indexSet);
+ } // if
} // deallocate
// ----------------------------------------------------------------------
More information about the CIG-COMMITS
mailing list