summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Jon McCann <jmccann@redhat.com>2010-11-15 12:44:32 -0500
committerWilliam Jon McCann <jmccann@redhat.com>2010-11-15 12:44:32 -0500
commitef744d75d08c75758e82daeb66dcdd1938f17482 (patch)
treeb552387cf33901e1b15e978f19e5a45c1012e050
parent1b33c07973e906c49b62f68e2f9ce385f38f102e (diff)
downloadlibnotify-ef744d75d08c75758e82daeb66dcdd1938f17482.tar.gz
Show a warning and assert if notify_init isn't called before show
-rw-r--r--libnotify/notification.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libnotify/notification.c b/libnotify/notification.c
index 8bcd9de..417c9a8 100644
--- a/libnotify/notification.c
+++ b/libnotify/notification.c
@@ -509,6 +509,11 @@ notify_notification_show (NotifyNotification *notification,
g_return_val_if_fail (NOTIFY_IS_NOTIFICATION (notification), FALSE);
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+ if (notify_get_app_name () == NULL) {
+ g_warning ("you must call notify_init() before showing");
+ g_assert_not_reached ();
+ }
+
priv = notification->priv;
proxy = _notify_get_proxy (error);
if (proxy == NULL) {