From afb052be39a6ea5e3f5858f69aaf47d27995ec3e Mon Sep 17 00:00:00 2001 From: Jonathan Tellier Date: Fri, 7 Aug 2009 09:19:19 -0400 Subject: Setting priv->bus_message_source_id to 0 to make sure that g_source_remove is not called twice on it. --- src/empathy-call-window.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'src/empathy-call-window.c') diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c index 7bca4a564..e8266591e 100644 --- a/src/empathy-call-window.c +++ b/src/empathy-call-window.c @@ -1133,7 +1133,10 @@ empathy_call_window_finalize (GObject *object) } if (priv->bus_message_source_id != 0) - g_source_remove (priv->bus_message_source_id); + { + g_source_remove (priv->bus_message_source_id); + priv->bus_message_source_id = 0; + } /* free any data held directly by the object here */ g_mutex_free (priv->lock); @@ -1190,7 +1193,11 @@ empathy_call_window_reset_pipeline (EmpathyCallWindow *self) return TRUE; if (priv->bus_message_source_id != 0) - g_source_remove (priv->bus_message_source_id); + { + g_source_remove (priv->bus_message_source_id); + priv->bus_message_source_id = 0; + } + state_change_return = gst_element_set_state (priv->pipeline, GST_STATE_NULL); if (state_change_return == GST_STATE_CHANGE_SUCCESS || @@ -1703,7 +1710,10 @@ empathy_call_window_delete_cb (GtkWidget *widget, GdkEvent*event, if (priv->pipeline != NULL) { if (priv->bus_message_source_id != 0) - g_source_remove (priv->bus_message_source_id); + { + g_source_remove (priv->bus_message_source_id); + priv->bus_message_source_id = 0; + } gst_element_set_state (priv->pipeline, GST_STATE_NULL); } -- cgit v1.2.3