diff options
author | Alexandre Rostovtsev <tetromino@gentoo.org> | 2012-05-19 20:53:27 -0400 |
---|---|---|
committer | Arx Cruz <arxcruz@gnome.org> | 2012-05-23 18:47:34 -0300 |
commit | d845087870a8994dfb0842bf72ca7a5d5138fbef (patch) | |
tree | b6154249f5332cd43b2223f6c8eda3559590aaa1 /src | |
parent | Remove markup from translatable strings (diff) | |
download | zenity-d845087870a8994dfb0842bf72ca7a5d5138fbef.tar.gz zenity-d845087870a8994dfb0842bf72ca7a5d5138fbef.tar.bz2 zenity-d845087870a8994dfb0842bf72ca7a5d5138fbef.zip |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/option.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/option.c b/src/option.c index 7fdb7f1d..334ec86a 100644 --- a/src/option.c +++ b/src/option.c @@ -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 |