summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorportix <portix@gmx.net>2014-03-03 13:56:31 +0100
committerportix <portix@gmx.net>2014-03-03 13:56:31 +0100
commite2ad4314566da1dd204b072061ade2c25914eb44 (patch)
treed5a11310cd7e6c048dfabc40a92753b1d804ef1d
parent2a600c8594af6e4c140159cd0f8463e4cabc596b (diff)
downloaddwb-e2ad4314566da1dd204b072061ade2c25914eb44.zip
Free all keybinds in scripts_clear_keymap
-rw-r--r--src/scripts.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/scripts.c b/src/scripts.c
index 3df4950b..86bf691d 100644
--- a/src/scripts.c
+++ b/src/scripts.c
@@ -1997,11 +1997,14 @@ void
scripts_clear_keymap() {
if (s_keymap_dirty) {
EXEC_LOCK;
- for (GList *l = dwb.keymap; l; l=l->next) {
- KeyMap *km = l->data;
+ GList *l, *next = dwb.keymap;
+ KeyMap *km;
+ while (next) {
+ l = next;
+ next = next->next;
+ km = l->data;
if (km->map->prop & CP_SCRIPT && km->map->arg.i == 0) {
unbind_free_keymap(s_global_context, l);
- break;
}
}
EXEC_UNLOCK;