[GRASS-SVN] r69227 - in grass/trunk: . imagery/i.group

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Aug 23 05:19:21 PDT 2016


Author: martinl
Date: 2016-08-23 05:19:21 -0700 (Tue, 23 Aug 2016)
New Revision: 69227

Modified:
   grass/trunk/
   grass/trunk/imagery/i.group/main.c
Log:
i.group segfaults on empty input (see #1705)


Property changes on: grass/trunk
___________________________________________________________________
Deleted: svn:mergeinfo
   - /grass/branches/releasebranch_7_0:62348

Modified: grass/trunk/imagery/i.group/main.c
===================================================================
--- grass/trunk/imagery/i.group/main.c	2016-08-23 10:54:58 UTC (rev 69226)
+++ grass/trunk/imagery/i.group/main.c	2016-08-23 12:19:21 UTC (rev 69227)
@@ -215,6 +215,10 @@
 
     for (m = 0; m < k; m++) {
 	skip = 0;
+        if (!rasters[m]) {
+            G_warning(_("No input raster maps defined"));
+            return 0;
+        }
 	if ((mapset = G_find_raster(rasters[m], "")) == NULL) {
 	    G_warning(_("Raster map <%s> not found. Skipped."), rasters[m]);
             skip = 1;



More information about the grass-commit mailing list