Przeglądaj źródła

Prevent segfault if mapset == NULL

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@33624 15284696-431f-4ddb-bdfa-cd5b030d7da7
Glynn Clements 16 lat temu
rodzic
commit
ef13321e5a
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      lib/gis/open.c

+ 1 - 1
lib/gis/open.c

@@ -66,7 +66,7 @@ static int G__open(const char *element,
 	    name = xname;
 	    mapset = xmapset;
 	}
-	else if (!*mapset)
+	else if (!mapset || !*mapset)
 	    mapset = G_find_file2(element, name, mapset);
 
 	if (!mapset)