From 3bc379cc08cd95fb0e49bf8b06a0fcc1ac4d2741 Mon Sep 17 00:00:00 2001 From: Johan Malm Date: Mon, 19 Jul 2021 07:06:36 +0100 Subject: [PATCH] desktop: handle missing output safely --- src/desktop.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/desktop.c b/src/desktop.c index a90e134f..1b0e3b7f 100644 --- a/src/desktop.c +++ b/src/desktop.c @@ -277,6 +277,9 @@ desktop_view_at(struct server *server, double lx, double ly, server->output_layout, lx, ly); struct output *output = output_from_wlr_output(server, wlr_output); + if (!output) { + return NULL; + } if ((*surface = layer_surface_at(&output->layers[ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY], lx, ly, sx, sy))) { return NULL;