From 615bb0e7e7fc615b18ad752dbce02793fe38ed6b Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 21 Feb 2020 21:17:11 +0100 Subject: [PATCH] Fix ordering of commands --- seat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/seat.c b/seat.c index 7f58b9a..7bd12c9 100644 --- a/seat.c +++ b/seat.c @@ -295,11 +295,11 @@ cg_keyboard_group_add(struct wlr_input_device *device, struct cg_seat *seat) /* This is reached if and only if the keyboard could not be inserted into * any group */ struct cg_keyboard_group *cg_group = calloc(1, sizeof(struct cg_keyboard_group)); - cg_group->seat = seat; if (cg_group == NULL) { wlr_log(WLR_ERROR, "Failed to allocate keyboard group."); return; } + cg_group->seat = seat; cg_group->wlr_group = wlr_keyboard_group_create(); if (cg_group->wlr_group == NULL) { wlr_log(WLR_ERROR, "Failed to create wlr keyboard group.");