shell: Fix a potential NULL pointer dereference
get_shell_surface() may return NULL. Found by scan-build.
This commit is contained in:
committed by
Kristian Høgsberg
parent
648a4dd3ec
commit
2c3849be91
+2
-1
@@ -1373,7 +1373,8 @@ take_surface_to_workspace_by_seat(struct desktop_shell *shell,
|
|||||||
workspace_has_only(to, surface))
|
workspace_has_only(to, surface))
|
||||||
update_workspace(shell, index, from, to);
|
update_workspace(shell, index, from, to);
|
||||||
else {
|
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,
|
wl_list_insert(&shell->workspaces.anim_sticky_list,
|
||||||
&shsurf->workspace_transform.link);
|
&shsurf->workspace_transform.link);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user