From: Johan Malm Date: Mon, 19 Jul 2021 06:06:36 +0000 (+0100) Subject: desktop: handle missing output safely X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=3bc379cc08cd95fb0e49bf8b06a0fcc1ac4d2741;p=proto%2Flabwc.git desktop: handle missing output safely --- 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;