diff options
author | Sjoerd Simons <sjoerd.simons@collabora.co.uk> | 2011-03-23 23:00:08 +0800 |
---|---|---|
committer | Sjoerd Simons <sjoerd.simons@collabora.co.uk> | 2011-03-23 23:12:07 +0800 |
commit | 71403238333ea70c8ffb6b58a066eef5715c29a7 (patch) | |
tree | 33d4995fa8dba27b1d8e1205835184d4b2e078f7 | |
parent | 213cdb60921d87364db80d4b7f645d4fd8c5f65b (diff) | |
download | gsoc2013-empathy-71403238333ea70c8ffb6b58a066eef5715c29a7.tar gsoc2013-empathy-71403238333ea70c8ffb6b58a066eef5715c29a7.tar.gz gsoc2013-empathy-71403238333ea70c8ffb6b58a066eef5715c29a7.tar.bz2 gsoc2013-empathy-71403238333ea70c8ffb6b58a066eef5715c29a7.tar.lz gsoc2013-empathy-71403238333ea70c8ffb6b58a066eef5715c29a7.tar.xz gsoc2013-empathy-71403238333ea70c8ffb6b58a066eef5715c29a7.tar.zst gsoc2013-empathy-71403238333ea70c8ffb6b58a066eef5715c29a7.zip |
Minimize the scope in which we use TpyCallChannel
-rw-r--r-- | src/empathy-call-window.c | 13 |
1 files 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 |