From 4d0a11da3de36a4f0b86f8b8bc1b6666dcdaef1f Mon Sep 17 00:00:00 2001 From: James Walmsley Date: Mon, 7 Mar 2022 20:47:39 +0000 Subject: [PATCH] ipc-json: Fix NULL ptr dereference if layout NULL --- sway/input/input-manager.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sway/input/input-manager.c b/sway/input/input-manager.c index 8538d97ca..7d0d8b079 100644 --- a/sway/input/input-manager.c +++ b/sway/input/input-manager.c @@ -236,7 +236,6 @@ static void handle_new_input(struct wl_listener *listener, void *data) { apply_input_type_config(input_device); - sway_input_configure_libinput_device(input_device); wl_signal_add(&device->events.destroy, &input_device->device_destroy); input_device->device_destroy.notify = handle_device_destroy; @@ -266,6 +265,8 @@ static void handle_new_input(struct wl_listener *listener, void *data) { } } } + + sway_input_configure_libinput_device(input_device); if (!added) { sway_log(SWAY_DEBUG,