aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmanuele Aina <emanuele.aina@collabora.com>2012-03-15 19:41:11 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-03-16 18:21:21 +0800
commit1e03889e1c6994166f73e83d531103ed5f02ae55 (patch)
tree48c208e75a9707532e7574c5bd02ffc7a40d993c
parentee98d8feb897a7151542cc3998a7e73c86ef86a7 (diff)
downloadgsoc2013-empathy-1e03889e1c6994166f73e83d531103ed5f02ae55.tar
gsoc2013-empathy-1e03889e1c6994166f73e83d531103ed5f02ae55.tar.gz
gsoc2013-empathy-1e03889e1c6994166f73e83d531103ed5f02ae55.tar.bz2
gsoc2013-empathy-1e03889e1c6994166f73e83d531103ed5f02ae55.tar.lz
gsoc2013-empathy-1e03889e1c6994166f73e83d531103ed5f02ae55.tar.xz
gsoc2013-empathy-1e03889e1c6994166f73e83d531103ed5f02ae55.tar.zst
gsoc2013-empathy-1e03889e1c6994166f73e83d531103ed5f02ae55.zip
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
-rw-r--r--src/empathy-call-window.c15
1 files 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