diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c index ef0696ed..40cba183 100644 --- a/desktop-shell/shell.c +++ b/desktop-shell/shell.c @@ -4630,6 +4630,9 @@ switcher_binding(struct weston_keyboard *keyboard, const struct timespec *time, struct switcher *switcher; switcher = malloc(sizeof *switcher); + if (!switcher) + return; + switcher->shell = shell; switcher->current = NULL; switcher->listener.notify = switcher_handle_view_destroy;