]> git.0d.be Git - empathy.git/commitdiff
chat_window_new_message_cb: check that we found the chatroom
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Wed, 23 Mar 2011 13:27:19 +0000 (14:27 +0100)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Wed, 23 Mar 2011 13:27:22 +0000 (14:27 +0100)
There is a race, if the chatroom manager didn't parse the chatrooms list yet,
this was crashing.

src/empathy-chat-window.c

index bf1ef6b0bcf6cc9955948af44a48fa71313fcec2..aacc301b35a76efe0add1a93561bbcd1fcd28673 100644 (file)
@@ -1451,7 +1451,7 @@ chat_window_new_message_cb (EmpathyChat       *chat,
                chatroom = empathy_chatroom_manager_find (priv->chatroom_manager,
                                                          account, room);
 
-               if (empathy_chatroom_is_always_urgent (chatroom)) {
+               if (chatroom != NULL && empathy_chatroom_is_always_urgent (chatroom)) {
                        needs_urgency = TRUE;
                } else {
                        needs_urgency = empathy_message_should_highlight (message);