From: Philip Withnall <philip.withn...@collabora.co.uk>

get_shell_surface() may return NULL. Found by scan-build.
---
 src/shell.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/shell.c b/src/shell.c
index 79ea463..1af687a 100644
--- a/src/shell.c
+++ b/src/shell.c
@@ -1370,7 +1370,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);
 
-- 
1.8.3.1

_______________________________________________
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to