[GRASS-SVN] r50546 - grass/trunk/vector/v.extrude

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Jan 30 05:57:04 EST 2012


Author: mmetz
Date: 2012-01-30 02:57:03 -0800 (Mon, 30 Jan 2012)
New Revision: 50546

Modified:
   grass/trunk/vector/v.extrude/main.c
Log:
add check if column exists

Modified: grass/trunk/vector/v.extrude/main.c
===================================================================
--- grass/trunk/vector/v.extrude/main.c	2012-01-30 10:46:39 UTC (rev 50545)
+++ grass/trunk/vector/v.extrude/main.c	2012-01-30 10:57:03 UTC (rev 50546)
@@ -171,6 +171,12 @@
 	    G_fatal_error(_("Unable to open database <%s> by driver <%s>"),
 			  Fi->database, Fi->driver);
 
+	if (db_get_column(driver, Fi->table, hcolumn->answer, &column) != DB_OK)
+	    G_fatal_error(_("Column <%s> does not exist"),
+			  hcolumn->answer);
+	else
+	    db_free_column(column);
+
 	ctype = db_column_Ctype(driver, Fi->table, hcolumn->answer);
 
 	if (ctype != DB_C_TYPE_INT && ctype != DB_C_TYPE_STRING &&



More information about the grass-commit mailing list