Merge pull request #88 from 4e554c4c/alloc_crashing

Prevent alloc errors from crashing
This commit is contained in:
Drew DeVault 2017-08-15 12:21:58 -04:00 committed by GitHub
commit 27c13d621d
13 changed files with 109 additions and 13 deletions

View file

@ -239,7 +239,7 @@ static void seat_handle_capabilities(void *data, struct wl_seat *wl_seat,
struct wlr_input_device *wlr_device = allocate_device(backend,
WLR_INPUT_DEVICE_KEYBOARD);
if (!wlr_device) {
wlr_log(L_ERROR, "Unable to allocate wl_pointer device");
wlr_log(L_ERROR, "Unable to allocate wl_keyboard device");
return;
}
wlr_device->keyboard = calloc(1, sizeof(struct wlr_keyboard));