[GRASS-SVN] r63875 - grass/trunk/raster/r.tile

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Dec 29 15:14:18 PST 2014


Author: neteler
Date: 2014-12-29 15:14:18 -0800 (Mon, 29 Dec 2014)
New Revision: 63875

Modified:
   grass/trunk/raster/r.tile/main.c
Log:
r.tile: reasonable error msg if input map does not exist

Modified: grass/trunk/raster/r.tile/main.c
===================================================================
--- grass/trunk/raster/r.tile/main.c	2014-12-29 21:26:52 UTC (rev 63874)
+++ grass/trunk/raster/r.tile/main.c	2014-12-29 23:14:18 UTC (rev 63875)
@@ -31,6 +31,7 @@
 {
     struct GModule *module;
     int infile;
+    const char *mapset;
     size_t cell_size;
     int ytile, xtile, y, overlap;
     int *outfiles;
@@ -80,6 +81,10 @@
     G_get_set_window(&src_w);
     overlap = parm.overlap->answer ? atoi(parm.overlap->answer) : 0;
 
+    mapset = G_find_raster2(parm.rastin->answer, "");
+    if (mapset == NULL)
+        G_fatal_error(_("Raster map <%s> not found"), parm.rastin->answer);
+
     /* set window to old map */
     Rast_get_cellhd(parm.rastin->answer, "", &src_w);
     dst_w = src_w;



More information about the grass-commit mailing list