mirror of
https://github.com/labwc/labwc.git
synced 2025-11-05 13:29:58 -05:00
desktop: handle missing output safely
This commit is contained in:
parent
c9312edf0b
commit
3bc379cc08
1 changed files with 3 additions and 0 deletions
|
|
@ -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;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue