[GRASS-SVN] r40399 - grass/trunk/lib/gis

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Jan 12 16:41:33 EST 2010


Author: glynn
Date: 2010-01-12 16:41:31 -0500 (Tue, 12 Jan 2010)
New Revision: 40399

Modified:
   grass/trunk/lib/gis/key_value1.c
Log:
Make G_free_key_value() accept a NULL pointer 


Modified: grass/trunk/lib/gis/key_value1.c
===================================================================
--- grass/trunk/lib/gis/key_value1.c	2010-01-12 21:19:30 UTC (rev 40398)
+++ grass/trunk/lib/gis/key_value1.c	2010-01-12 21:41:31 UTC (rev 40399)
@@ -150,6 +150,9 @@
 {
     int n;
 
+    if (!kv)
+	return;
+
     for (n = 0; n < kv->nitems; n++) {
 	G_free(kv->key[n]);
 	G_free(kv->value[n]);



More information about the grass-commit mailing list