forked from enlightenment/enlightenment
fix notification crashes when a callback isn't specified
This commit is contained in:
parent
69c570104a
commit
efa9f4276a
|
@ -451,7 +451,8 @@ client_notify_cb(void *data, const Eldbus_Message *msg, Eldbus_Pending *pending)
|
||||||
if (!eldbus_message_arguments_get(msg, "u", &id))
|
if (!eldbus_message_arguments_get(msg, "u", &id))
|
||||||
goto end;
|
goto end;
|
||||||
end:
|
end:
|
||||||
cb(data, id);
|
if (cb)
|
||||||
|
cb(data, id);
|
||||||
eldbus_connection_unref(conn);
|
eldbus_connection_unref(conn);
|
||||||
eldbus_shutdown();
|
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);
|
p = eldbus_connection_send(conn, msg, client_notify_cb, data, 5000);
|
||||||
EINA_SAFETY_ON_NULL_GOTO(p, error);
|
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);
|
eldbus_pending_data_set(p, "conn", conn);
|
||||||
|
|
||||||
return EINA_TRUE;
|
return EINA_TRUE;
|
||||||
|
|
Loading…
Reference in New Issue