From 32c7386b0f3dcd9f0138164ce597e34f79cdd1b9 Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Thu, 6 Sep 2018 08:29:44 +1000 Subject: Fix management of bindings during reload seat_execute_command needs to check the flags on `binding_copy`, as `binding` will be a dangling pointer after a reload command. handle_keyboard_key needs to set the next_repeat_binding for non-reloads prior to executing the command in case the binding is freed by the reload command. --- sway/commands/bind.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sway/commands/bind.c') diff --git a/sway/commands/bind.c b/sway/commands/bind.c index 5b56ba30..047018e0 100644 --- a/sway/commands/bind.c +++ b/sway/commands/bind.c @@ -329,7 +329,7 @@ void seat_execute_command(struct sway_seat *seat, struct sway_binding *binding) binding->command, results->error); } - if (binding->flags & BINDING_RELOAD) { // free the binding if we made a copy + if (binding_copy->flags & BINDING_RELOAD) { free_sway_binding(binding_copy); } free_cmd_results(results); -- cgit v1.2.3