diff options
author | William Jon McCann <jmccann@redhat.com> | 2010-11-15 14:44:40 -0500 |
---|---|---|
committer | William Jon McCann <jmccann@redhat.com> | 2010-11-15 14:44:40 -0500 |
commit | 54b628500675f6b99f0cb48653c6583d4256d152 (patch) | |
tree | 85c1ffd18200b27a33c6a679c56777ae681d3bd2 | |
parent | e6a4970a790a158fef9a042a492671a765b936a1 (diff) | |
download | libnotify-54b628500675f6b99f0cb48653c6583d4256d152.tar.gz |
Don't set NULL hint strings
-rw-r--r-- | libnotify/notification.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/libnotify/notification.c b/libnotify/notification.c index 417c9a8..7578966 100644 --- a/libnotify/notification.c +++ b/libnotify/notification.c @@ -613,9 +613,11 @@ notify_notification_set_category (NotifyNotification *notification, g_return_if_fail (notification != NULL); g_return_if_fail (NOTIFY_IS_NOTIFICATION (notification)); - notify_notification_set_hint_string (notification, - "category", - category); + if (category != NULL && category[0] != '\0') { + notify_notification_set_hint_string (notification, + "category", + category); + } } /** @@ -873,8 +875,11 @@ notify_notification_set_hint_string (NotifyNotification *notification, const char *key, const char *value) { - notify_notification_set_hint (notification, key, - g_variant_new_string (value)); + if (value != NULL && value[0] != '\0') { + notify_notification_set_hint (notification, + key, + g_variant_new_string (value)); + } } static gboolean |