From 4d72a7a6977aadd395f5c96977ab0a1db303cb46 Mon Sep 17 00:00:00 2001 From: Sjoerd Simons Date: Mon, 7 Nov 2011 11:04:14 +0000 Subject: Call: Cope with not having the Channel direclty after startin a call --- src/empathy-call-window.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c index 39ae6f397..ab7dbeef8 100644 --- a/src/empathy-call-window.c +++ b/src/empathy-call-window.c @@ -3507,7 +3507,13 @@ start_call (EmpathyCallWindow *self) TpySendingState s; g_object_get (priv->handler, "call-channel", &call, NULL); - s = tpy_call_channel_get_video_state (call); + /* If the call channel isn't set yet we're requesting it, if we're + * requesting it with initial video it should be PENDING_SEND when we get + * it */ + if (call == NULL) + s = TPY_SENDING_STATE_PENDING_SEND; + else + s = tpy_call_channel_get_video_state (call); if (s == TPY_SENDING_STATE_PENDING_SEND || s == TPY_SENDING_STATE_SENDING) @@ -3528,7 +3534,8 @@ start_call (EmpathyCallWindow *self) } } - g_object_unref (call); + if (call != NULL) + g_object_unref (call); } } -- cgit v1.2.3