[GRASS-SVN] r72421 - grass/trunk/vector/v.random

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Mar 20 10:23:19 PDT 2018


Author: martinl
Date: 2018-03-20 10:23:19 -0700 (Tue, 20 Mar 2018)
New Revision: 72421

Modified:
   grass/trunk/vector/v.random/main.c
Log:
v.random: cosmetics related to r72416, see #3524

Modified: grass/trunk/vector/v.random/main.c
===================================================================
--- grass/trunk/vector/v.random/main.c	2018-03-20 16:44:37 UTC (rev 72420)
+++ grass/trunk/vector/v.random/main.c	2018-03-20 17:23:19 UTC (rev 72421)
@@ -558,8 +558,10 @@
 			G_debug(3, "    area = %d Vect_point_in_area() = %d", area, ret);
 
 			if (ret >= 1) {
-                            /* read categories for matched area */
-                            Vect_get_area_cats(&In, area, Cats);
+                            if (field > 0) {
+                                /* read categories for matched area */
+                                Vect_get_area_cats(&In, area, Cats);
+                            }
 			    outside = 0;
 			    break;
 			}



More information about the grass-commit mailing list