[GRASS-SVN] r64691 - grass/trunk/vector/v.surf.bspline

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Feb 19 10:41:35 PST 2015


Author: martinl
Date: 2015-02-19 10:41:35 -0800 (Thu, 19 Feb 2015)
New Revision: 64691

Modified:
   grass/trunk/vector/v.surf.bspline/main.c
Log:
v.surf.bspline: fix when no default DB is defined


Modified: grass/trunk/vector/v.surf.bspline/main.c
===================================================================
--- grass/trunk/vector/v.surf.bspline/main.c	2015-02-19 18:13:58 UTC (rev 64690)
+++ grass/trunk/vector/v.surf.bspline/main.c	2015-02-19 18:41:35 UTC (rev 64691)
@@ -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