diff options
-rw-r--r-- | agent/agent.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/agent/agent.c b/agent/agent.c index 2fd74b8..86421d8 100644 --- a/agent/agent.c +++ b/agent/agent.c @@ -1769,11 +1769,14 @@ static gboolean notify_pseudo_tcp_socket_clock (gpointer user_data) { Component *component = user_data; - Stream *stream = component->stream; - NiceAgent *agent = component->agent; + Stream *stream; + NiceAgent *agent; agent_lock(); + stream = component->stream; + agent = component->agent; + if (g_source_is_destroyed (g_main_current_source ())) { nice_debug ("Source was destroyed. " "Avoided race condition in notify_pseudo_tcp_socket_clock"); |