projects
/
platform
/
upstream
/
weston.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7dda25b
)
desktop-shell: Avoid NULL pointer dereference
author
Armin Krezović
<krezovic.armin@gmail.com>
Thu, 23 Jun 2016 09:59:32 +0000
(11:59 +0200)
committer
Pekka Paalanen
<pekka.paalanen@collabora.co.uk>
Mon, 27 Jun 2016 10:17:05 +0000
(13:17 +0300)
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>
desktop-shell/shell.c
patch
|
blob
|
history
diff --git
a/desktop-shell/shell.c
b/desktop-shell/shell.c
index
7deba55
..
825c6c3
100644
(file)
--- a/
desktop-shell/shell.c
+++ b/
desktop-shell/shell.c
@@
-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);
}