mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-06 09:08:33 +02:00
desktop-shell: Avoid NULL pointer dereference
When there are no outputs present, an output pointer can be NULL. Dereferencing such pointer will result in a crash. Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Signed-off-by: Armin Krezović <krezovic.armin@gmail.com>
This commit is contained in:
parent
7dda25b2d5
commit
c77f258b4a
1 changed files with 1 additions and 1 deletions
|
|
@ -2290,7 +2290,7 @@ shell_surface_set_class(struct wl_client *client,
|
|||
static void
|
||||
restore_output_mode(struct weston_output *output)
|
||||
{
|
||||
if (output->original_mode)
|
||||
if (output && output->original_mode)
|
||||
weston_output_mode_switch_to_native(output);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue