desktop: handle missing output safely

This commit is contained in:
Johan Malm 2021-07-19 07:06:36 +01:00
parent c9312edf0b
commit 3bc379cc08

View file

@ -277,6 +277,9 @@ desktop_view_at(struct server *server, double lx, double ly,
server->output_layout, lx, ly); server->output_layout, lx, ly);
struct output *output = output_from_wlr_output(server, wlr_output); 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], if ((*surface = layer_surface_at(&output->layers[ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY],
lx, ly, sx, sy))) { lx, ly, sx, sy))) {
return NULL; return NULL;