diff options
author | Marius Vlad <marius.vlad@collabora.com> | 2020-10-06 09:51:42 +0300 |
---|---|---|
committer | Marius Vlad <marius.vlad@collabora.com> | 2020-10-06 10:11:09 +0300 |
commit | 54b89861c1c7331469b5f8c646a6cb79fb7ed73d (patch) | |
tree | 2a9b7c4254959f031cffaefa0cafa9a93014c925 | |
parent | 70367f62fdbd5c9dbbbb293571a0955eab7da6db (diff) |
shell: Avoid creating and inserting black surface
Creating and inserting the black surface will require to have an
valid weston output. That might not be always the case so guard
against no output being set.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: If7034bf0259fee164ba0f4b6a6ac3ef7d6bf30d6
-rw-r--r-- | src/shell.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/shell.c b/src/shell.c index c884f16..21f321d 100644 --- a/src/shell.c +++ b/src/shell.c @@ -569,6 +569,9 @@ create_black_surface_view(struct ivi_output *output) struct weston_compositor *wc= ivi->compositor; struct weston_output *woutput = output->output; + if (!woutput) + return; + surface = weston_surface_create(wc); view = weston_view_create(surface); @@ -616,9 +619,9 @@ insert_black_surface(struct ivi_output *output) { struct weston_view *view; - if (!output && + if ((!output && !output->fullscreen_view.fs && - !output->fullscreen_view.fs->view) { + !output->fullscreen_view.fs->view) || !output->output) { weston_log("Output %s doesn't have a surface installed!\n", output->name); return; } |