mirror of
https://gitlab.freedesktop.org/wayland/weston
synced 2024-07-22 11:14:21 +00:00
fullscreen-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. Signed-off-by: Armin Krezović <krezovic.armin@gmail.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
This commit is contained in:
parent
c77f258b4a
commit
70487cd404
|
@ -288,7 +288,7 @@ fs_output_for_output(struct weston_output *output)
|
|||
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…
Reference in a new issue