[GRASS-SVN] r45511 - grass/branches/develbranch_6/gui/tcltk/gis.m

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Mar 1 13:03:54 EST 2011


Author: marisn
Date: 2011-03-01 10:03:54 -0800 (Tue, 01 Mar 2011)
New Revision: 45511

Modified:
   grass/branches/develbranch_6/gui/tcltk/gis.m/gm.tcl
Log:
gis.m Lack of LOCATION or MAPSET is fatal.

Modified: grass/branches/develbranch_6/gui/tcltk/gis.m/gm.tcl
===================================================================
--- grass/branches/develbranch_6/gui/tcltk/gis.m/gm.tcl	2011-03-01 17:33:54 UTC (rev 45510)
+++ grass/branches/develbranch_6/gui/tcltk/gis.m/gm.tcl	2011-03-01 18:03:54 UTC (rev 45511)
@@ -70,6 +70,12 @@
 	exit 1
 }
 
+# if any of those is empty, there's no reason to continue. it's a failure.
+if { $gisdbase=={} || $location_name=={} || $mapset=={} } {
+	GmLib::errmsg [G_msg "GISDBASE or LOCATION_NAME or MAPSET is empty. \
+	This is a fatal error. gis.m can not work without proper settings."]
+	exit 1
+}
 
 # path to icons for GIS Manager
 set iconpath [file join "$env(GISBASE)" "etc" "gui" "icons" "grass"]



More information about the grass-commit mailing list