If the handle given in ActionInvoked is not found in the local table of handles, return from the ActionInvoked handler. Otherwise, every program using libnotify will crash when a notification is clicked. Oops!
This commit is contained in:
parent
057751cc69
commit
7fdc36d00e
|
@ -1,3 +1,11 @@
|
||||||
|
Wed Jul 27 00:18:16 PDT 2005 Christian Hammond <chipx86@chipx86.com>
|
||||||
|
|
||||||
|
* libnotify/notify.c:
|
||||||
|
- If the handle given in ActionInvoked is not found in the local
|
||||||
|
table of handles, return from the ActionInvoked handler. Otherwise,
|
||||||
|
every program using libnotify will crash when a notification is
|
||||||
|
clicked. Oops!
|
||||||
|
|
||||||
Sat Jul 16 02:53:06 PDT 2005 Christian Hammond <chipx86@gnupdate.org>
|
Sat Jul 16 02:53:06 PDT 2005 Christian Hammond <chipx86@gnupdate.org>
|
||||||
|
|
||||||
* libnotify/notify.c:
|
* libnotify/notify.c:
|
||||||
|
|
|
@ -204,6 +204,9 @@ _filter_func(DBusConnection *dbus_conn, DBusMessage *message, void *user_data)
|
||||||
|
|
||||||
handle = g_hash_table_lookup(_handles, &id);
|
handle = g_hash_table_lookup(_handles, &id);
|
||||||
|
|
||||||
|
if (handle == NULL)
|
||||||
|
goto exit;
|
||||||
|
|
||||||
if (handle->actions_table == NULL)
|
if (handle->actions_table == NULL)
|
||||||
{
|
{
|
||||||
print_error("An action (%d) was invoked for a notification (%d) "
|
print_error("An action (%d) was invoked for a notification (%d) "
|
||||||
|
@ -230,6 +233,7 @@ _filter_func(DBusConnection *dbus_conn, DBusMessage *message, void *user_data)
|
||||||
else
|
else
|
||||||
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
|
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
|
||||||
|
|
||||||
|
exit:
|
||||||
return DBUS_HANDLER_RESULT_HANDLED;
|
return DBUS_HANDLER_RESULT_HANDLED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue