aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2018-01-22 16:06:42 -0500
committerMike Blumenkrantz <zmike@osg.samsung.com>2018-01-22 16:06:42 -0500
commitefa9f4276a16a9c91509702ad03e196402d5c341 (patch)
treeb6b19234a0d19c4753e66f022e977c065368a135
parentrequire X-Gadget-Version field for sandbox gadget .desktops (diff)
downloadenlightenment-efa9f4276a16a9c91509702ad03e196402d5c341.tar.gz
fix notification crashes when a callback isn't specified
-rw-r--r--src/bin/e_notification.c6
1 files 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;