diff options
author | Tony Crisci <tony@dubstepdish.com> | 2018-04-02 13:56:35 -0400 |
---|---|---|
committer | Tony Crisci <tony@dubstepdish.com> | 2018-04-02 13:56:35 -0400 |
commit | c7a6524954578977dd8f806713a258a0947a4951 (patch) | |
tree | e27ca3225b874d123dc5f0a9ca20973d66c5e6c3 /sway/input/input-manager.c | |
parent | 5e024278a62e6fb00a0521240244c428d2382984 (diff) |
fix segfault
Diffstat (limited to 'sway/input/input-manager.c')
-rw-r--r-- | sway/input/input-manager.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sway/input/input-manager.c b/sway/input/input-manager.c index 34aed115..c3507f65 100644 --- a/sway/input/input-manager.c +++ b/sway/input/input-manager.c @@ -230,11 +230,10 @@ static void handle_new_input(struct wl_listener *listener, void *data) { return; } - struct seat_config *seat_config = seat_get_config(seat); - bool added = false; wl_list_for_each(seat, &input->seats, link) { - bool has_attachment = config && + struct seat_config *seat_config = seat_get_config(seat); + bool has_attachment = seat_config && (seat_config_get_attachment(seat_config, input_device->identifier) || seat_config_get_attachment(seat_config, "*")); @@ -246,6 +245,7 @@ static void handle_new_input(struct wl_listener *listener, void *data) { if (!added) { wl_list_for_each(seat, &input->seats, link) { + struct seat_config *seat_config = seat_get_config(seat); if (seat_config && seat_config->fallback == 1) { seat_add_device(seat, input_device); added = true; |