diff options
author | Marius Vlad <marius.vlad@collabora.com> | 2024-07-16 12:14:34 +0300 |
---|---|---|
committer | Marius Vlad <marius.vlad@collabora.com> | 2024-07-16 12:14:34 +0300 |
commit | c1610846f53a0d722da97ce33ae02ad89c6b0194 (patch) | |
tree | 72f7c1df7ab78330e968775e4da4e331b0d79d04 | |
parent | 18e93caca8ad397d504215d673765871b2c88f25 (diff) |
layout: Don't assume we have background surface set-upsalmon_18.90.0salmon/18.90.018.90.0
set_background request assumes we have set-up a bg surface which might
not be the always case. Just avoid dereferencing before testing for a
valid background surface role.
Bug-AGL: SPEC-5205
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Reported-by: Scott Murray <scott.murray@konsulko.com>
Change-Id: I3481d7eda83c8d6e7605dc0e8fec240029405808
-rw-r--r-- | src/layout.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/layout.c b/src/layout.c index 48c478e..90f7a1b 100644 --- a/src/layout.c +++ b/src/layout.c @@ -144,14 +144,14 @@ ivi_background_init(struct ivi_compositor *ivi, struct ivi_output *output) struct weston_output *woutput = output->output; struct ivi_surface *bg = output->background; struct weston_view *view; - struct weston_surface *wsurface = - weston_desktop_surface_get_surface(bg->dsurface); + struct weston_surface *wsurface; if (!bg) { weston_log("WARNING: Output does not have a background\n"); return; } + wsurface = weston_desktop_surface_get_surface(bg->dsurface); assert(bg->role == IVI_SURFACE_ROLE_BACKGROUND); view = bg->view; |