Commit 5a73eef7 authored by Arnaud Rebillout's avatar Arnaud Rebillout

gfdonotificationbackend: hold a strong ref on backend

This is to avoid race between dispose() being called on the
GFdoNotificationBackend instance, and any pending operations which are
still waiting on a D-Bus reply when it’s disposed.

(thx to Philip Withnall for pointing that out)
Signed-off-by: Arnaud Rebillout's avatarArnaud Rebillout <>
parent c26558c1
......@@ -67,6 +67,7 @@ freedesktop_notification_free (gpointer data)
FreedesktopNotification *n = data;
g_object_unref (n->backend);
g_free (n->id);
g_free (n->default_action);
if (n->default_action_target)
......@@ -83,7 +84,7 @@ freedesktop_notification_new (GFdoNotificationBackend *backend,
FreedesktopNotification *n;
n = g_slice_new0 (FreedesktopNotification);
n->backend = backend;
n->backend = g_object_ref (backend);
n->id = g_strdup (id);
n->notify_id = 0;
g_notification_get_default_action (notification,
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment