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
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;