[GRASS-SVN] r49084 - grass/trunk/lib/ogsf
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Nov 3 15:58:23 EDT 2011
Author: annakrat
Date: 2011-11-03 12:58:23 -0700 (Thu, 03 Nov 2011)
New Revision: 49084
Modified:
grass/trunk/lib/ogsf/Gp3.c
grass/trunk/lib/ogsf/Gv3.c
Log:
libogsf: don't crash in case of missing value in color column
Modified: grass/trunk/lib/ogsf/Gp3.c
===================================================================
--- grass/trunk/lib/ogsf/Gp3.c 2011-11-03 19:53:17 UTC (rev 49083)
+++ grass/trunk/lib/ogsf/Gp3.c 2011-11-03 19:58:23 UTC (rev 49084)
@@ -241,6 +241,8 @@
if (nvals < 1)
continue;
str = db_get_value_string(&value);
+ if (!str)
+ continue;
if (G_str_to_color(str, &red, &grn, &blu) != 1) {
G_warning(_("Invalid color definition (%s)"),
str);
Modified: grass/trunk/lib/ogsf/Gv3.c
===================================================================
--- grass/trunk/lib/ogsf/Gv3.c 2011-11-03 19:53:17 UTC (rev 49083)
+++ grass/trunk/lib/ogsf/Gv3.c 2011-11-03 19:58:23 UTC (rev 49084)
@@ -378,6 +378,8 @@
if (nvals < 1)
continue;
str = db_get_value_string(&value);
+ if (!str)
+ continue;
if (G_str_to_color(str, &red, &grn, &blu) != 1) {
G_warning(_("Invalid color definition (%s)"),
str);
More information about the grass-commit
mailing list