From 1e03889e1c6994166f73e83d531103ed5f02ae55 Mon Sep 17 00:00:00 2001 From: Emanuele Aina Date: Thu, 15 Mar 2012 12:41:11 +0100 Subject: Don't restart a call if one already in progress Fixes the crash when calling someone while being already in a call with the same contact. https://bugzilla.gnome.org/show_bug.cgi?id=671931 --- src/empathy-call-window.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c index 9b057c0ef..565b9edca 100644 --- a/src/empathy-call-window.c +++ b/src/empathy-call-window.c @@ -2420,12 +2420,17 @@ empathy_call_window_present (EmpathyCallWindow *self, { g_return_if_fail (EMPATHY_IS_CALL_HANDLER (handler)); - tp_clear_object (&self->priv->handler); - self->priv->handler = g_object_ref (handler); - empathy_call_window_connect_handler (self); - empathy_window_present (GTK_WINDOW (self)); - empathy_call_window_restart_call (self); + + if (self->priv->call_state == DISCONNECTED) + { + /* start a new call if one is not already in progress */ + tp_clear_object (&self->priv->handler); + self->priv->handler = g_object_ref (handler); + empathy_call_window_connect_handler (self); + + empathy_call_window_restart_call (self); + } } static void -- cgit v1.2.3