[GRASS-SVN] r65396 - grass/branches/releasebranch_7_0/db/db.tables

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Jun 7 04:24:11 PDT 2015


Author: martinl
Date: 2015-06-07 04:24:11 -0700 (Sun, 07 Jun 2015)
New Revision: 65396

Modified:
   grass/branches/releasebranch_7_0/db/db.tables/main.c
Log:
db.table: check if driver is defined (bug-fix)
          (merge r65395 from trunk)


Modified: grass/branches/releasebranch_7_0/db/db.tables/main.c
===================================================================
--- grass/branches/releasebranch_7_0/db/db.tables/main.c	2015-06-07 11:22:49 UTC (rev 65395)
+++ grass/branches/releasebranch_7_0/db/db.tables/main.c	2015-06-07 11:24:11 UTC (rev 65396)
@@ -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