[GRASS-SVN] r41539 - grass/branches/develbranch_6/lib/gis
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Mar 25 17:02:41 EDT 2010
Author: martinl
Date: 2010-03-25 17:02:40 -0400 (Thu, 25 Mar 2010)
New Revision: 41539
Modified:
grass/branches/develbranch_6/lib/gis/parser.c
Log:
huhabla: Fixed segfault which appears while automated gui creation
(merge r41496 from trunk)
Modified: grass/branches/develbranch_6/lib/gis/parser.c
===================================================================
--- grass/branches/develbranch_6/lib/gis/parser.c 2010-03-25 19:56:43 UTC (rev 41538)
+++ grass/branches/develbranch_6/lib/gis/parser.c 2010-03-25 21:02:40 UTC (rev 41539)
@@ -2854,7 +2854,7 @@
opt = &first_option;
while (opt != '\0') {
- if (opt->answer != '\0' && opt->answers[0] != NULL) {
+ if (opt->answer != '\0' && opt->answers && opt->answers[0] != NULL) {
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