summaryrefslogtreecommitdiff
path: root/fullscreen-shell
diff options
context:
space:
mode:
authorArmin Krezović <krezovic.armin@gmail.com>2016-06-23 11:59:33 +0200
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>2016-06-27 13:20:54 +0300
commit70487cd404552b344a5bbdfa632c63e0815abeff (patch)
treea44f0449b89e298c20ecce708610ec7401cced10 /fullscreen-shell
parentc77f258b4a51097959e9eb024a95c728bc11b612 (diff)
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>
Diffstat (limited to 'fullscreen-shell')
-rw-r--r--fullscreen-shell/fullscreen-shell.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fullscreen-shell/fullscreen-shell.c b/fullscreen-shell/fullscreen-shell.c
index a32e46a4..ecaebfa0 100644
--- a/fullscreen-shell/fullscreen-shell.c
+++ b/fullscreen-shell/fullscreen-shell.c
@@ -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);
}