diff options
author | xclaesse <xclaesse@4ee84921-47dd-4033-b63a-18d7a039a3e4> | 2008-05-05 04:28:07 +0800 |
---|---|---|
committer | xclaesse <xclaesse@4ee84921-47dd-4033-b63a-18d7a039a3e4> | 2008-05-05 04:28:07 +0800 |
commit | 0d4982846e6d816d14e431384fad89daf3a5b56c (patch) | |
tree | a909f2d75f117d2e964ed77450f64c59fb49b148 /src | |
parent | 8028f0d11afa2d0d3e6b056e324c60b08e43699d (diff) | |
download | gsoc2013-empathy-0d4982846e6d816d14e431384fad89daf3a5b56c.tar gsoc2013-empathy-0d4982846e6d816d14e431384fad89daf3a5b56c.tar.gz gsoc2013-empathy-0d4982846e6d816d14e431384fad89daf3a5b56c.tar.bz2 gsoc2013-empathy-0d4982846e6d816d14e431384fad89daf3a5b56c.tar.lz gsoc2013-empathy-0d4982846e6d816d14e431384fad89daf3a5b56c.tar.xz gsoc2013-empathy-0d4982846e6d816d14e431384fad89daf3a5b56c.tar.zst gsoc2013-empathy-0d4982846e6d816d14e431384fad89daf3a5b56c.zip |
Avoid copying chat list in chat_window_delete_event_cb.
git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@1079 4ee84921-47dd-4033-b63a-18d7a039a3e4
Diffstat (limited to 'src')
-rw-r--r-- | src/empathy-chat-window.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/src/empathy-chat-window.c b/src/empathy-chat-window.c index 82dfdd662..bb8960479 100644 --- a/src/empathy-chat-window.c +++ b/src/empathy-chat-window.c @@ -707,21 +707,15 @@ chat_window_delete_event_cb (GtkWidget *dialog, GdkEvent *event, EmpathyChatWindow *window) { - EmpathyChatWindowPriv *priv; - GList *list; - GList *l; - - priv = GET_PRIV (window); + EmpathyChatWindowPriv *priv = GET_PRIV (window); DEBUG ("Delete event received"); - list = g_list_copy (priv->chats); - - for (l = list; l; l = l->next) { - empathy_chat_window_remove_chat (window, l->data); + g_object_ref (window); + while (priv->chats) { + empathy_chat_window_remove_chat (window, priv->chats->data); } - - g_list_free (list); + g_object_unref (window); return TRUE; } |