aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy
diff options
context:
space:
mode:
authorWill Thompson <will.thompson@collabora.co.uk>2009-06-09 05:39:56 +0800
committerWill Thompson <will.thompson@collabora.co.uk>2009-06-09 17:53:51 +0800
commit279a93cbc25ade081510d94c20777e16527cf475 (patch)
tree6229b094edb07ba72658f9ce49fbf34de74bacfc /libempathy
parentf0ff888b79ce3c902f4f7211bbe1dadcba0c1799 (diff)
downloadgsoc2013-empathy-279a93cbc25ade081510d94c20777e16527cf475.tar
gsoc2013-empathy-279a93cbc25ade081510d94c20777e16527cf475.tar.gz
gsoc2013-empathy-279a93cbc25ade081510d94c20777e16527cf475.tar.bz2
gsoc2013-empathy-279a93cbc25ade081510d94c20777e16527cf475.tar.lz
gsoc2013-empathy-279a93cbc25ade081510d94c20777e16527cf475.tar.xz
gsoc2013-empathy-279a93cbc25ade081510d94c20777e16527cf475.tar.zst
gsoc2013-empathy-279a93cbc25ade081510d94c20777e16527cf475.zip
Break after deleting current item in chatroom list
When I signed off, Empathy exploded. l was 0x33, which oddly enough was secretly not the address of a GList. :-) I think what happened is that empathy_chatroom_manager_remove() deleted the list node currently pointed to by l; then the loop advanced to l->next, which was now garbage. We don't need to keep iterating once we find the chatroom we were looking for, so break out of the loop.
Diffstat (limited to 'libempathy')
-rw-r--r--libempathy/empathy-chatroom-manager.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libempathy/empathy-chatroom-manager.c b/libempathy/empathy-chatroom-manager.c
index ad1f8c611..44416670e 100644
--- a/libempathy/empathy-chatroom-manager.c
+++ b/libempathy/empathy-chatroom-manager.c
@@ -662,13 +662,16 @@ chatroom_manager_chat_destroyed_cb (EmpathyTpChat *chat,
continue;
empathy_chatroom_set_tp_chat (chatroom, NULL);
+
if (!empathy_chatroom_is_favorite (chatroom))
{
/* Remove the chatroom from the list, unless it's in the list of
* favourites..
* FIXME this policy should probably not be in libempathy */
- empathy_chatroom_manager_remove (manager, chatroom);
+ chatroom_manager_remove_link (manager, l);
}
+
+ break;
}
}