Skip to content
Snippets Groups Projects
Commit 45dc9786 authored by George Kiagiadakis's avatar George Kiagiadakis
Browse files

endpoint: ref the endpoint while unregistering

The core may be the last object holding a reference to the endpoint,
so the unregister call may destroy it.
parent eabd2a49
No related branches found
No related tags found
No related merge requests found
......@@ -279,8 +279,10 @@ wp_endpoint_unregister (WpEndpoint * self)
g_info ("WpEndpoint:%p unregistering '%s' (%s)", self, priv->name,
priv->media_class);
g_object_ref (self);
wp_core_remove_global (priv->core, WP_GLOBAL_ENDPOINT, self);
priv->core = NULL;
g_object_unref (self);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment