From 71403238333ea70c8ffb6b58a066eef5715c29a7 Mon Sep 17 00:00:00 2001 From: Sjoerd Simons Date: Wed, 23 Mar 2011 15:00:08 +0000 Subject: Minimize the scope in which we use TpyCallChannel --- src/empathy-call-window.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c index 2c8c860e5..fdb753245 100644 --- a/src/empathy-call-window.c +++ b/src/empathy-call-window.c @@ -2547,9 +2547,6 @@ static void start_call (EmpathyCallWindow *self) { EmpathyCallWindowPriv *priv = GET_PRIV (self); - TpyCallChannel *call; - - g_object_get (priv->handler, "call-channel", &call, NULL); priv->call_started = TRUE; empathy_call_handler_start_call (priv->handler, @@ -2557,7 +2554,11 @@ start_call (EmpathyCallWindow *self) if (empathy_call_handler_has_initial_video (priv->handler)) { - TpySendingState s = tpy_call_channel_get_video_state (call); + TpyCallChannel *call; + TpySendingState s; + + g_object_get (priv->handler, "call-channel", &call, NULL); + s = tpy_call_channel_get_video_state (call); if (s == TPY_SENDING_STATE_PENDING_SEND || s == TPY_SENDING_STATE_SENDING) @@ -2579,9 +2580,9 @@ start_call (EmpathyCallWindow *self) add_video_preview_to_pipeline (self); } } - } - g_object_unref (call); + g_object_unref (call); + } } static gboolean -- cgit v1.2.3