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

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Sep 30 16:30:27 EDT 2008


Author: glynn
Date: 2008-09-30 16:30:27 -0400 (Tue, 30 Sep 2008)
New Revision: 33624

Modified:
   grass/trunk/lib/gis/open.c
Log:
Prevent segfault if mapset == NULL


Modified: grass/trunk/lib/gis/open.c
===================================================================
--- grass/trunk/lib/gis/open.c	2008-09-30 18:09:19 UTC (rev 33623)
+++ grass/trunk/lib/gis/open.c	2008-09-30 20:30:27 UTC (rev 33624)
@@ -66,7 +66,7 @@
 	    name = xname;
 	    mapset = xmapset;
 	}
-	else if (!*mapset)
+	else if (!mapset || !*mapset)
 	    mapset = G_find_file2(element, name, mapset);
 
 	if (!mapset)



More information about the grass-commit mailing list