diff options
author | Mike Blumenkrantz <zmike@osg.samsung.com> | 2018-01-22 16:06:42 -0500 |
---|---|---|
committer | Mike Blumenkrantz <zmike@osg.samsung.com> | 2018-01-22 16:06:42 -0500 |
commit | efa9f4276a16a9c91509702ad03e196402d5c341 (patch) | |
tree | b6b19234a0d19c4753e66f022e977c065368a135 | |
parent | 69c570104a6ee585d1d689954e541ac01e34df90 (diff) | |
download | enlightenment-efa9f4276a16a9c91509702ad03e196402d5c341.tar.gz |
fix notification crashes when a callback isn't specified
-rw-r--r-- | src/bin/e_notification.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/bin/e_notification.c b/src/bin/e_notification.c index 0dc7b0b53d..60377ae734 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; |