From 9d03f0d006ad3080d6bbb91bff6ea5e71c7c98a2 Mon Sep 17 00:00:00 2001 From: Arx Cruz Date: Fri, 29 Aug 2014 14:31:57 +0200 Subject: Bug 733870 - Segmentation fault on zenity --notification This fix a problem when user calls --hint=urgency without specify a :NOTIFY_URGENCY --- src/notification.c | 4 ++++ 1 file changed, 4 insertions(+) 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 { -- cgit