bugfix: copy binding before run
Copy the binding struct before running it and use this copy to emit the binding event. This fixes a crash when the command `reload` is used in a binding when the binding event is emitted.
This commit is contained in:
committed by
Michael Stapelberg
parent
0125530409
commit
bb1f857b00
@ -147,9 +147,7 @@ void load_configuration(xcb_connection_t *conn, const char *override_configpath,
|
||||
while (!TAILQ_EMPTY(bindings)) {
|
||||
bind = TAILQ_FIRST(bindings);
|
||||
TAILQ_REMOVE(bindings, bind, bindings);
|
||||
FREE(bind->translated_to);
|
||||
FREE(bind->command);
|
||||
FREE(bind);
|
||||
binding_free(bind);
|
||||
}
|
||||
FREE(bindings);
|
||||
SLIST_REMOVE(&modes, mode, Mode, modes);
|
||||
|
Reference in New Issue
Block a user