kiosk-shell: Don't assume a valid output

Turns out kiosk_shell_output_set_active_surface_tree() requires having a
valid output which as seen in the wild might not be case. Prevents
an illegal dereference on an invalid shoutput.

Fixes: #920
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
This commit is contained in:
Marius Vlad 2024-07-02 15:27:26 +03:00
parent 4566eae245
commit 52354f159f
1 changed files with 3 additions and 2 deletions

View File

@ -963,8 +963,9 @@ desktop_surface_removed(struct weston_desktop_surface *desktop_surface,
WESTON_ACTIVATE_FLAG_NONE);
} else {
kiosk_seat->focused_surface = NULL;
kiosk_shell_output_set_active_surface_tree(shoutput,
NULL);
if (shoutput)
kiosk_shell_output_set_active_surface_tree(shoutput,
NULL);
}
}