[GRASS-SVN] r64716 - grass/branches/releasebranch_7_0/vector/v.surf.bspline

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Feb 21 06:18:24 PST 2015


Author: martinl
Date: 2015-02-21 06:18:23 -0800 (Sat, 21 Feb 2015)
New Revision: 64716

Modified:
   grass/branches/releasebranch_7_0/vector/v.surf.bspline/main.c
Log:
v.surf.bspline: fix when no default DB is defined
                (merge r64691 from trunk)


Modified: grass/branches/releasebranch_7_0/vector/v.surf.bspline/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.surf.bspline/main.c	2015-02-21 14:17:42 UTC (rev 64715)
+++ grass/branches/releasebranch_7_0/vector/v.surf.bspline/main.c	2015-02-21 14:18:23 UTC (rev 64716)
@@ -221,8 +221,11 @@
     flag_auxiliar = FALSE;
 
     drv = db_get_default_driver_name();
-    if (!drv)
-        G_fatal_error(_("No default DB driver defined"));
+    if (!drv) {
+        if (db_set_default_connection() != DB_OK)
+            G_fatal_error(_("Unable to set default DB connection"));
+        drv = db_get_default_driver_name();
+    }
     db = db_get_default_database_name();
     if (!db)
         G_fatal_error(_("No default DB defined"));



More information about the grass-commit mailing list