Browse Source

v.to.db: test exit status of Vect_open_old()

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@64072 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Neteler 10 years ago
parent
commit
cf15d28a5e
1 changed files with 2 additions and 1 deletions
  1. 2 1
      vector/v.to.db/main.c

+ 2 - 1
vector/v.to.db/main.c

@@ -55,7 +55,8 @@ int main(int argc, char *argv[])
 
     /* open map */
     Vect_set_open_level(2);
-    Vect_open_old(&Map, options.name, "");
+    if (Vect_open_old(&Map, options.name, "") < 0)
+	G_fatal_error(_("Unable to open vector map <%s>"), options.name);
     Vect_set_error_handler_io(&Map, NULL);
    
     Fi = Vect_get_field(&Map, options.field);