[GRASS-SVN] r58907 - grass-addons/grass7/vector/v.centerpoint

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Feb 6 13:24:16 PST 2014


Author: mmetz
Date: 2014-02-06 13:24:16 -0800 (Thu, 06 Feb 2014)
New Revision: 58907

Modified:
   grass-addons/grass7/vector/v.centerpoint/main.c
Log:
v.centerpoint: fix copy table

Modified: grass-addons/grass7/vector/v.centerpoint/main.c
===================================================================
--- grass-addons/grass7/vector/v.centerpoint/main.c	2014-02-06 20:59:53 UTC (rev 58906)
+++ grass-addons/grass7/vector/v.centerpoint/main.c	2014-02-06 21:24:16 UTC (rev 58907)
@@ -228,7 +228,8 @@
     }
     if (nlines) {
 	lines_center(&In, Outp, layer, cat_list, nprimitives, mode);
-	Vect_copy_table(&In, &Out, layer, 1, NULL, GV_1TABLE);
+	if (Outp)
+	    Vect_copy_table(&In, Outp, layer, 1, NULL, GV_1TABLE);
     }
     
     Vect_close(&In);
@@ -242,7 +243,8 @@
 	else {
 	    if (Vect_get_num_areas(&In) > 0) {
 		areas_center(&In, Outp, layer, cat_list, mode);
-		Vect_copy_table(&In, &Out, layer, 1, NULL, GV_1TABLE);
+		if (Outp)
+		    Vect_copy_table(&In, Outp, layer, 1, NULL, GV_1TABLE);
 	    }
 	    else
 		G_warning(_("No areas in input vector <%s>"), old->answer);



More information about the grass-commit mailing list