Do not crash in --forms --add-list without column values

Be a bit more user friendly, and instead of crashing, add a default
column name if the user forgot to use --column-values with a --forms list.

https://bugzilla.gnome.org/show_bug.cgi?id=676406
This commit is contained in:
Alexandre Rostovtsev 2012-05-19 20:53:27 -04:00 committed by Arx Cruz
parent 4ca4e421c5
commit d845087870
1 changed files with 3 additions and 1 deletions

View File

@ -1918,7 +1918,9 @@ zenity_forms_post_callback (GOptionContext *context,
results->forms_data->column_values = g_slist_append (results->forms_data->column_values, values);
values = zenity_forms_list_values[++i];
}
}
} else
results->forms_data->column_values = g_slist_append (NULL, "column");
if (zenity_forms_date_format)
results->forms_data->date_format = zenity_forms_date_format;
else