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

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Aug 28 01:51:09 PDT 2012


Author: martinl
Date: 2012-08-28 01:51:08 -0700 (Tue, 28 Aug 2012)
New Revision: 52942

Modified:
   grass/trunk/vector/v.random/main.c
Log:
v.random: check Vect_open_new()


Modified: grass/trunk/vector/v.random/main.c
===================================================================
--- grass/trunk/vector/v.random/main.c	2012-08-28 07:50:46 UTC (rev 52941)
+++ grass/trunk/vector/v.random/main.c	2012-08-28 08:51:08 UTC (rev 52942)
@@ -163,7 +163,8 @@
     }
 
     /* create new vector map */
-    Vect_open_new(&Out, output, flag.z->answer ? WITH_Z : WITHOUT_Z);
+    if (-1 == Vect_open_new(&Out, output, flag.z->answer ? WITH_Z : WITHOUT_Z))
+        G_fatal_error(_("Unable to create vector map <%s>"), output);
 
     /* Do we need to write random values into attribute table? */
     if (parm.zcol->answer) {



More information about the grass-commit mailing list