Commit 3fae6c59 authored by Olivier Crête's avatar Olivier Crête Committed by Ross Burton
Browse files

Disconnect signal handlers when contextmanager is disposed

Otherwise signal may be emitted on a non-existing object and it will crash
parent f38832e7
......@@ -224,6 +224,10 @@ gupnp_context_manager_dispose (GObject *object)
manager = GUPNP_CONTEXT_MANAGER (object);
if (manager->priv->impl != NULL) {
g_signal_handlers_disconnect_by_func (manager->priv->impl,
on_context_available, manager);
g_signal_handlers_disconnect_by_func (manager->priv->impl,
on_context_unavailable, manager);
g_object_unref (manager->priv->impl);
manager->priv->impl = NULL;
}
......
Supports Markdown
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