[GRASS-SVN] r41496 - grass/trunk/lib/gis
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Mar 20 13:48:18 EDT 2010
Author: huhabla
Date: 2010-03-20 13:48:17 -0400 (Sat, 20 Mar 2010)
New Revision: 41496
Modified:
grass/trunk/lib/gis/parser.c
Log:
Fixed segfault which appears while automated gui creation
Modified: grass/trunk/lib/gis/parser.c
===================================================================
--- grass/trunk/lib/gis/parser.c 2010-03-20 17:29:12 UTC (rev 41495)
+++ grass/trunk/lib/gis/parser.c 2010-03-20 17:48:17 UTC (rev 41496)
@@ -631,7 +631,7 @@
opt = &st->first_option;
while (opt) {
- if (opt->answer && opt->answers[0]) {
+ if (opt->answer && opt->answers && opt->answers[0]) {
slen = strlen(opt->key) + strlen(opt->answers[0]) + 4; /* +4 for: ' ' = " " */
if (len + slen >= nalloced) {
nalloced += (nalloced + 1024 > len + slen) ? 1024 : slen + 1;
More information about the grass-commit
mailing list