Mercurial > pidgin
diff libpurple/notify.c @ 17620:c1c533448097
sadrul's fix for the userinfo notify crash on disconnect that was caused by
the fancy new "Retrieving..." thing. This is version 3 of the fix.
This is nosnilmot committing this, with no idea what the --author option to
mtn commit actually does.
committer: Stu Tomlinson <stu@nosnilmot.com>
| author | Sadrul Habib Chowdhury <imadil@gmail.com> |
|---|---|
| date | Thu, 14 Jun 2007 01:24:16 +0000 |
| parents | 46351036fdb4 |
| children | 40d51793f2d7 |
line wrap: on
line diff
--- a/libpurple/notify.c Wed Jun 13 21:52:37 2007 +0000 +++ b/libpurple/notify.c Thu Jun 14 01:24:16 2007 +0000 @@ -749,18 +749,16 @@ void purple_notify_close_with_handle(void *handle) { - GList *l, *l_next; + GList *l, *prev = NULL; PurpleNotifyUiOps *ops; g_return_if_fail(handle != NULL); ops = purple_notify_get_ui_ops(); - for (l = handles; l != NULL; l = l_next) { + for (l = handles; l != NULL; l = prev ? prev->next : handles) { PurpleNotifyInfo *info = l->data; - l_next = l->next; - if (info->handle == handle) { handles = g_list_remove(handles, info); @@ -771,7 +769,8 @@ info->cb(info->cb_user_data); g_free(info); - } + } else + prev = l; } }
