Commit 5f2a2dd6 authored by Olivier Crête's avatar Olivier Crête

nicesink: Check for signal present before removing it

The signal is only connected when setting an agent, if no agent
has been set, there will be no signal.
parent 489c8e1c
......@@ -259,11 +259,10 @@ gst_nice_sink_dispose (GObject *object)
{
GstNiceSink *sink = GST_NICE_SINK (object);
if (sink->agent) {
if (sink->agent && sink->writable_id)
g_signal_handler_disconnect (sink->agent, sink->writable_id);
g_object_unref (sink->agent);
}
sink->agent = NULL;
sink->writable_id = 0;
g_clear_object (&sink->agent);
g_cond_clear (&sink->writable_cond);
......
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