Fix prompt cleanup (was not going through the list correctly when freeing items)
authorDana Jansens <danakj@orodu.net>
Tue, 2 Aug 2011 19:53:42 +0000 (15:53 -0400)
committerDana Jansens <danakj@orodu.net>
Sun, 30 Sep 2012 19:03:07 +0000 (15:03 -0400)
openbox/prompt.c

index 1aa79d2..051c993 100644 (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);
         }