Fix ordering of commands

This commit is contained in:
Your Name 2020-02-21 21:17:11 +01:00
parent adaebf47de
commit 615bb0e7e7

2
seat.c
View file

@ -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 /* This is reached if and only if the keyboard could not be inserted into
* any group */ * any group */
struct cg_keyboard_group *cg_group = calloc(1, sizeof(struct cg_keyboard_group)); struct cg_keyboard_group *cg_group = calloc(1, sizeof(struct cg_keyboard_group));
cg_group->seat = seat;
if (cg_group == NULL) { if (cg_group == NULL) {
wlr_log(WLR_ERROR, "Failed to allocate keyboard group."); wlr_log(WLR_ERROR, "Failed to allocate keyboard group.");
return; return;
} }
cg_group->seat = seat;
cg_group->wlr_group = wlr_keyboard_group_create(); cg_group->wlr_group = wlr_keyboard_group_create();
if (cg_group->wlr_group == NULL) { if (cg_group->wlr_group == NULL) {
wlr_log(WLR_ERROR, "Failed to create wlr keyboard group."); wlr_log(WLR_ERROR, "Failed to create wlr keyboard group.");