[GRASS-SVN] r56240 - grass/trunk/lib/vector/diglib
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon May 13 05:34:46 PDT 2013
Author: mmetz
Date: 2013-05-13 05:34:45 -0700 (Mon, 13 May 2013)
New Revision: 56240
Modified:
grass/trunk/lib/vector/diglib/spindex.c
Log:
diglib: add safety check
Modified: grass/trunk/lib/vector/diglib/spindex.c
===================================================================
--- grass/trunk/lib/vector/diglib/spindex.c 2013-05-13 12:33:28 UTC (rev 56239)
+++ grass/trunk/lib/vector/diglib/spindex.c 2013-05-13 12:34:45 UTC (rev 56240)
@@ -252,13 +252,17 @@
/* destroy tree structures */
/* Node spidx */
- RTreeDestroyTree(Plus->Node_spidx);
+ if (Plus->Node_spidx)
+ RTreeDestroyTree(Plus->Node_spidx);
/* Line spidx */
- RTreeDestroyTree(Plus->Line_spidx);
+ if (Plus->Line_spidx)
+ RTreeDestroyTree(Plus->Line_spidx);
/* Area spidx */
- RTreeDestroyTree(Plus->Area_spidx);
+ if (Plus->Area_spidx)
+ RTreeDestroyTree(Plus->Area_spidx);
/* Isle spidx */
- RTreeDestroyTree(Plus->Isle_spidx);
+ if (Plus->Isle_spidx)
+ RTreeDestroyTree(Plus->Isle_spidx);
/* 3D future : */
/* Face spidx */
More information about the grass-commit
mailing list