[GRASS-SVN] r38367 - grass/branches/develbranch_6/lib/gis
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Jul 11 10:05:29 EDT 2009
Author: martinl
Date: 2009-07-11 10:05:29 -0400 (Sat, 11 Jul 2009)
New Revision: 38367
Modified:
grass/branches/develbranch_6/lib/gis/color_rules.c
Log:
fix trac #477 (d.vect: segfault if zcolor= does not exist)
Modified: grass/branches/develbranch_6/lib/gis/color_rules.c
===================================================================
--- grass/branches/develbranch_6/lib/gis/color_rules.c 2009-07-11 11:53:18 UTC (rev 38366)
+++ grass/branches/develbranch_6/lib/gis/color_rules.c 2009-07-11 14:05:29 UTC (rev 38367)
@@ -254,11 +254,17 @@
static int load_rules_name(struct Colors *colors, const char *name, DCELL min,
DCELL max)
{
+ int ret;
char path[GPATH_MAX];
sprintf(path, "%s/etc/colors/%s", G_gisbase(), name);
- return load_rules_file(colors, path, min, max);
+ ret = load_rules_file(colors, path, min, max);
+
+ if (!ret)
+ G_fatal_error(_("Unable to load color rules <%s>"), name);
+
+ return ret;
}
int G_make_colors(struct Colors *colors, const char *name, CELL min, CELL max)
More information about the grass-commit
mailing list