Fix prompt cleanup (was not going through the list correctly when freeing items)

This commit is contained in:
Dana Jansens 2011-08-02 15:53:42 -04:00
parent efc9d9708e
commit 34b332c22a

View file

@ -75,11 +75,12 @@ void prompt_startup(gboolean reconfig)
void prompt_shutdown(gboolean reconfig)
{
GList *it;
GList *it, *next;
if (!reconfig) {
for (it = prompt_list; it; it = g_list_next(it)) {
for (it = prompt_list; it; it = next) {
ObPrompt *p = it->data;
next = it->next;
if (p->cleanup) p->cleanup(p, p->data);
}