diff --git a/tinywl/tinywl.c b/tinywl/tinywl.c index 6c043ed51..ead06fcf8 100644 --- a/tinywl/tinywl.c +++ b/tinywl/tinywl.c @@ -250,6 +250,7 @@ static void server_new_keyboard(struct tinywl_server *server, struct wlr_keyboard *wlr_keyboard = wlr_keyboard_from_input_device(device); struct tinywl_keyboard *keyboard = calloc(1, sizeof(*keyboard)); + assert(keyboard); keyboard->server = server; keyboard->wlr_keyboard = wlr_keyboard; @@ -625,6 +626,7 @@ static void server_new_output(struct wl_listener *listener, void *data) { /* Allocates and configures our state for this output */ struct tinywl_output *output = calloc(1, sizeof(*output)); + assert(output); output->wlr_output = wlr_output; output->server = server; @@ -801,6 +803,7 @@ static void server_new_xdg_toplevel(struct wl_listener *listener, void *data) { /* Allocate a tinywl_toplevel for this surface */ struct tinywl_toplevel *toplevel = calloc(1, sizeof(*toplevel)); + assert(toplevel); toplevel->server = server; toplevel->xdg_toplevel = xdg_toplevel; toplevel->scene_tree = @@ -859,6 +862,7 @@ static void server_new_xdg_popup(struct wl_listener *listener, void *data) { struct wlr_xdg_popup *xdg_popup = data; struct tinywl_popup *popup = calloc(1, sizeof(*popup)); + assert(popup); popup->xdg_popup = xdg_popup; /* We must add xdg popups to the scene graph so they get rendered. The