diff options
author | Xavier Claessens <xclaesse@src.gnome.org> | 2008-09-19 21:57:19 +0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@src.gnome.org> | 2008-09-19 21:57:19 +0800 |
commit | 99789261f769c8dd1d91377d7d792b4357d0c481 (patch) | |
tree | bbe0b726e4a29f3d56c9e88f6d899324ff10bb99 /src/empathy-main-window.c | |
parent | 84e34a9fa8f7f3d4991b68ffbdd9cd65f2022aa6 (diff) | |
download | gsoc2013-empathy-99789261f769c8dd1d91377d7d792b4357d0c481.tar gsoc2013-empathy-99789261f769c8dd1d91377d7d792b4357d0c481.tar.gz gsoc2013-empathy-99789261f769c8dd1d91377d7d792b4357d0c481.tar.bz2 gsoc2013-empathy-99789261f769c8dd1d91377d7d792b4357d0c481.tar.lz gsoc2013-empathy-99789261f769c8dd1d91377d7d792b4357d0c481.tar.xz gsoc2013-empathy-99789261f769c8dd1d91377d7d792b4357d0c481.tar.zst gsoc2013-empathy-99789261f769c8dd1d91377d7d792b4357d0c481.zip |
Do not crash if the chatroom's account has no connection. Fixes bug #550652.
svn path=/trunk/; revision=1471
Diffstat (limited to 'src/empathy-main-window.c')
-rw-r--r-- | src/empathy-main-window.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/empathy-main-window.c b/src/empathy-main-window.c index e41b3f11e..52a88c548 100644 --- a/src/empathy-main-window.c +++ b/src/empathy-main-window.c @@ -732,13 +732,15 @@ main_window_favorite_chatroom_join (EmpathyChatroom *chatroom) DEBUG ("Requesting channel for '%s'", room); connection = mission_control_get_tpconnection (mc, account, NULL); - tp_connection_run_until_ready (connection, TRUE, NULL, NULL); - empathy_connection_request_channel (connection, -1, - TP_IFACE_CHANNEL_TYPE_TEXT, - TP_HANDLE_TYPE_ROOM, - room, TRUE, - NULL, NULL, NULL, NULL); - g_object_unref (connection); + if (connection) { + tp_connection_run_until_ready (connection, TRUE, NULL, NULL); + empathy_connection_request_channel (connection, -1, + TP_IFACE_CHANNEL_TYPE_TEXT, + TP_HANDLE_TYPE_ROOM, + room, TRUE, + NULL, NULL, NULL, NULL); + g_object_unref (connection); + } g_object_unref (mc); } |