diff --git a/lib/wp/endpoint.c b/lib/wp/endpoint.c index 83db6776..c8f6524b 100644 --- a/lib/wp/endpoint.c +++ b/lib/wp/endpoint.c @@ -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); } }