]> git.mdlowis.com Git - proto/labwc.git/commitdiff
desktop: handle missing output safely
authorJohan Malm <jgm323@gmail.com>
Mon, 19 Jul 2021 06:06:36 +0000 (07:06 +0100)
committerJohan Malm <jgm323@gmail.com>
Mon, 19 Jul 2021 06:06:36 +0000 (07:06 +0100)
src/desktop.c

index a90e134fb8301408a45b34500b2c1c5dd1968257..1b0e3b7f3fe5dee0e16b9b21c319dd6289678270 100644 (file)
@@ -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;