projects
/
profile
/
ivi
/
weston-ivi-shell.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
648a4dd
)
shell: Fix a potential NULL pointer dereference
author
Philip Withnall
<philip.withnall@collabora.co.uk>
Mon, 25 Nov 2013 18:01:45 +0000
(18:01 +0000)
committer
Kristian Høgsberg
<krh@bitplanet.net>
Mon, 2 Dec 2013 19:44:51 +0000
(11:44 -0800)
get_shell_surface() may return NULL. Found by scan-build.
src/shell.c
patch
|
blob
|
history
diff --git
a/src/shell.c
b/src/shell.c
index
abed1c7
..
804a57e
100644
(file)
--- a/
src/shell.c
+++ b/
src/shell.c
@@
-1373,7
+1373,8
@@
take_surface_to_workspace_by_seat(struct desktop_shell *shell,
workspace_has_only(to, surface))
update_workspace(shell, index, from, to);
else {
- if (wl_list_empty(&shsurf->workspace_transform.link))
+ if (shsurf != NULL &&
+ wl_list_empty(&shsurf->workspace_transform.link))
wl_list_insert(&shell->workspaces.anim_sticky_list,
&shsurf->workspace_transform.link);