aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-05-21 21:54:39 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-05-21 21:54:39 +0800
commit156949f6b444cb4ef04d320fa4cef13c630f8573 (patch)
treea5d9a148082fb16b2fd0b849910dc8a00ed57d1a
parentb87a2f274a838e8636c64605506e6ba243c2671a (diff)
downloadgsoc2013-empathy-156949f6b444cb4ef04d320fa4cef13c630f8573.tar
gsoc2013-empathy-156949f6b444cb4ef04d320fa4cef13c630f8573.tar.gz
gsoc2013-empathy-156949f6b444cb4ef04d320fa4cef13c630f8573.tar.bz2
gsoc2013-empathy-156949f6b444cb4ef04d320fa4cef13c630f8573.tar.lz
gsoc2013-empathy-156949f6b444cb4ef04d320fa4cef13c630f8573.tar.xz
gsoc2013-empathy-156949f6b444cb4ef04d320fa4cef13c630f8573.tar.zst
gsoc2013-empathy-156949f6b444cb4ef04d320fa4cef13c630f8573.zip
main_window_favorite_chatroom_join: skip not connected accounts (#606738)
This fix a crash if the account is connecting. Conflicts: src/empathy-main-window.c
-rw-r--r--src/empathy-main-window.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/empathy-main-window.c b/src/empathy-main-window.c
index c4986bc4a..7bd6fab54 100644
--- a/src/empathy-main-window.c
+++ b/src/empathy-main-window.c
@@ -882,13 +882,15 @@ main_window_favorite_chatroom_join (EmpathyChatroom *chatroom)
const gchar *room;
account = empathy_chatroom_get_account (chatroom);
+ if (tp_account_get_connection_status (account, NULL) !=
+ TP_CONNECTION_STATUS_CONNECTED)
+ return;
connection = tp_account_get_connection (account);
+ g_assert (connection != NULL);
room = empathy_chatroom_get_room (chatroom);
- if (connection != NULL) {
- DEBUG ("Requesting channel for '%s'", room);
- empathy_dispatcher_join_muc (connection, room, NULL, NULL);
- }
+ DEBUG ("Requesting channel for '%s'", room);
+ empathy_dispatcher_join_muc (connection, room, NULL, NULL);
}
static void