[GRASS-SVN] r65395 - grass/trunk/db/db.tables

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Jun 7 04:22:50 PDT 2015


Author: martinl
Date: 2015-06-07 04:22:49 -0700 (Sun, 07 Jun 2015)
New Revision: 65395

Modified:
   grass/trunk/db/db.tables/main.c
Log:
db.table: check if driver is defined

Modified: grass/trunk/db/db.tables/main.c
===================================================================
--- grass/trunk/db/db.tables/main.c	2015-06-07 11:21:31 UTC (rev 65394)
+++ grass/trunk/db/db.tables/main.c	2015-06-07 11:22:49 UTC (rev 65395)
@@ -37,6 +37,9 @@
 
     parse_command_line(argc, argv);
 
+    if (!parms.driver)
+        G_fatal_error(_("Database connection not defined. Run db.connect."));
+      
     driver = db_start_driver(parms.driver);
     if (driver == NULL)
 	G_fatal_error(_("Unable to start driver <%s>"), parms.driver);



More information about the grass-commit mailing list