[GRASS-SVN] r56289 - grass/trunk/misc/m.nviz.image
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat May 18 01:52:29 PDT 2013
Author: martinl
Date: 2013-05-18 01:52:28 -0700 (Sat, 18 May 2013)
New Revision: 56289
Modified:
grass/trunk/misc/m.nviz.image/vector.c
Log:
m.nviz.image: fix r56288
Modified: grass/trunk/misc/m.nviz.image/vector.c
===================================================================
--- grass/trunk/misc/m.nviz.image/vector.c 2013-05-18 08:27:47 UTC (rev 56288)
+++ grass/trunk/misc/m.nviz.image/vector.c 2013-05-18 08:52:28 UTC (rev 56289)
@@ -243,6 +243,8 @@
width = params->vpoint_width_column;
marker = params->vpoint_marker_column;
}
+
+ driver = NULL;
for (i = 0; map->answers[i]; i++) {
if (1 > Vect_open_old(&Map, map->answers[i], ""))
G_fatal_error(_("Unable to open vector map <%s>"), map->answers[i]);
@@ -296,13 +298,13 @@
if (db_column_Ctype(driver, Fi->table, marker->answers[i]) != DB_C_TYPE_STRING)
G_fatal_error(_("Data type of marker column must be character"));
}
+
+ db_close_database_shutdown_driver(driver);
+ G_remove_error_handler(error_handler_db, driver);
}
G_remove_error_handler(error_handler_vector, &Map);
- G_remove_error_handler(error_handler_db, driver);
- db_close_database_shutdown_driver(driver);
-
if (Fi)
return Fi->number;
@@ -323,5 +325,6 @@
dbDriver *driver;
driver = (dbDriver *)p;
- db_close_database_shutdown_driver(driver);
+ if (driver)
+ db_close_database_shutdown_driver(driver);
}
More information about the grass-commit
mailing list