remote-endpoint: disconnect the control-value change callback when the proxy is destroyed

This avoids the theoretical crash that would happen if you change
the control value on an endpoint whose client-endpoint proxy has
already been destroyed
This commit is contained in:
George Kiagiadakis 2019-06-18 19:42:19 +03:00
parent b770cf6a3e
commit 5d93cf338b

View file

@ -385,6 +385,8 @@ client_endpoint_proxy_destroy (void *object)
{
WpEndpoint *ep = object;
g_object_set_qdata (G_OBJECT (ep), remote_endpoint_data_quark (), NULL);
g_signal_handlers_disconnect_matched (ep, G_SIGNAL_MATCH_FUNC, 0, 0, NULL,
on_endpoint_notify_control_value, NULL);
}
static const struct pw_proxy_events proxy_events = {