diff options
author | Arx Cruz <arxcruz@gnome.org> | 2014-08-29 14:31:57 +0200 |
---|---|---|
committer | Arx Cruz <arxcruz@gnome.org> | 2014-08-29 14:31:57 +0200 |
commit | 9d03f0d006ad3080d6bbb91bff6ea5e71c7c98a2 (patch) | |
tree | bb25044cd221405e54cee910c225967738bfc24a | |
parent | Bump to 3.13.90 (diff) | |
download | zenity-9d03f0d006ad3080d6bbb91bff6ea5e71c7c98a2.tar.gz zenity-9d03f0d006ad3080d6bbb91bff6ea5e71c7c98a2.tar.bz2 zenity-9d03f0d006ad3080d6bbb91bff6ea5e71c7c98a2.zip |
Bug 733870 - Segmentation fault on zenity --notification
This fix a problem when user calls --hint=urgency without
specify a :NOTIFY_URGENCY
-rw-r--r-- | src/notification.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/notification.c b/src/notification.c index 3a552026..d5631573 100644 --- a/src/notification.c +++ b/src/notification.c @@ -139,10 +139,14 @@ zenity_notification_set_hint(gpointer key, gpointer value, gpointer user_data) } else if ((g_ascii_strcasecmp ("x", hint_name) == 0) || (g_ascii_strcasecmp ("y", hint_name) == 0)) { /* int hints */ + if (string_value == NULL) + string_value = ""; int_value = (gint32) g_ascii_strtoll (string_value, NULL, 0); hint_value = g_variant_new_int32 (int_value); } else if ((g_ascii_strcasecmp ("urgency", hint_name) == 0)) { /* byte hints */ + if (string_value == NULL) + string_value = ""; byte_value = (guchar) g_ascii_strtoll (string_value, NULL, 0); hint_value = g_variant_new_byte (byte_value); } else { |