desktop-shell: do not lower_fullscreen_layer(s, NULL)

In activate, do not call lower_fullscreen_layer() at all if the output
is NULL. It should not do anything in that case, per the existing
comment.

This is a tentative crash fix for a case where there are no enabled
weston_outputs at all.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.com>
Reviewed-by: Ian Ray <ian.ray@ge.com>
This commit is contained in:
Pekka Paalanen 2018-05-02 10:21:57 +02:00
parent 30aa59759a
commit 87860c20ee
1 changed files with 2 additions and 1 deletions

View File

@ -3775,7 +3775,8 @@ activate(struct desktop_shell *shell, struct weston_view *view,
/* Only demote fullscreen surfaces on the output of activated shsurf. /* Only demote fullscreen surfaces on the output of activated shsurf.
* Leave fullscreen surfaces on unrelated outputs alone. */ * Leave fullscreen surfaces on unrelated outputs alone. */
lower_fullscreen_layer(shell, shsurf->output); if (shsurf->output)
lower_fullscreen_layer(shell, shsurf->output);
weston_view_activate(view, seat, flags); weston_view_activate(view, seat, flags);