From efa9f4276a16a9c91509702ad03e196402d5c341 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Mon, 22 Jan 2018 16:06:42 -0500 Subject: [PATCH] fix notification crashes when a callback isn't specified --- src/bin/e_notification.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/bin/e_notification.c b/src/bin/e_notification.c index 0dc7b0b53..60377ae73 100644 --- a/src/bin/e_notification.c +++ b/src/bin/e_notification.c @@ -451,7 +451,8 @@ client_notify_cb(void *data, const Eldbus_Message *msg, Eldbus_Pending *pending) if (!eldbus_message_arguments_get(msg, "u", &id)) goto end; end: - cb(data, id); + if (cb) + cb(data, id); eldbus_connection_unref(conn); eldbus_shutdown(); } @@ -532,7 +533,8 @@ notification_client_dbus_send(E_Notification_Notify *notify, E_Notification_Clie p = eldbus_connection_send(conn, msg, client_notify_cb, data, 5000); EINA_SAFETY_ON_NULL_GOTO(p, error); - eldbus_pending_data_set(p, "cb", cb); + if (cb) + eldbus_pending_data_set(p, "cb", cb); eldbus_pending_data_set(p, "conn", conn); return EINA_TRUE;