Browse Source

r.watershed: add safety check (2)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@51164 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Metz 13 years ago
parent
commit
2ff43ed274
1 changed files with 1 additions and 1 deletions
  1. 1 1
      raster/r.watershed/ram/close_maps2.c

+ 1 - 1
raster/r.watershed/ram/close_maps2.c

@@ -34,7 +34,7 @@ int close_array_seg(void)
 	    Rast_make_random_colors(&colors, 1, 2);
 	}
 
-	if (max < 1000) {
+	if (max < 1000 && max > 0) {
 	    Rast_set_c_color((CELL) 0, 0, 0, 0, &colors);
 	    r = 1;
 	    incr = 0;