aboutsummaryrefslogtreecommitdiffstats
path: root/src/empathy-main-window.c
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-05-21 21:35:44 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-05-21 21:48:35 +0800
commitb9fba4f58c149afedd5a49ab9b44b95ac4ec4023 (patch)
tree31ebef8cf3a55a651e20990825d5b3e1de7516d9 /src/empathy-main-window.c
parent8125535e64eb29da486f642103eb3b220a280fb7 (diff)
downloadgsoc2013-empathy-b9fba4f58c149afedd5a49ab9b44b95ac4ec4023.tar
gsoc2013-empathy-b9fba4f58c149afedd5a49ab9b44b95ac4ec4023.tar.gz
gsoc2013-empathy-b9fba4f58c149afedd5a49ab9b44b95ac4ec4023.tar.bz2
gsoc2013-empathy-b9fba4f58c149afedd5a49ab9b44b95ac4ec4023.tar.lz
gsoc2013-empathy-b9fba4f58c149afedd5a49ab9b44b95ac4ec4023.tar.xz
gsoc2013-empathy-b9fba4f58c149afedd5a49ab9b44b95ac4ec4023.tar.zst
gsoc2013-empathy-b9fba4f58c149afedd5a49ab9b44b95ac4ec4023.zip
main_window_favorite_chatroom_join: skip not connected accounts (#606738)
This fix a crash if the account is connecting.
Diffstat (limited to 'src/empathy-main-window.c')
-rw-r--r--src/empathy-main-window.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/empathy-main-window.c b/src/empathy-main-window.c
index 6826ee534..b526a4c0b 100644
--- a/src/empathy-main-window.c
+++ b/src/empathy-main-window.c
@@ -903,14 +903,16 @@ 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,
- gtk_get_current_event_time (), NULL, NULL);
- }
+ DEBUG ("Requesting channel for '%s'", room);
+ empathy_dispatcher_join_muc (connection, room,
+ gtk_get_current_event_time (), NULL, NULL);
}
static void