summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarius Vlad <marius.vlad@collabora.com>2020-10-06 09:51:42 +0300
committerMarius Vlad <marius.vlad@collabora.com>2020-11-05 10:41:32 +0200
commitdce67758ac776ccf71faf31f8236fa3b10c31a2c (patch)
tree63451f5594b3d0123e2121c4212cfc929dc7327f /src
parentb4d7a5a1861dc5028f3b1dff0e8432a2829208f2 (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. Bug-AGL: SPEC-3601 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: If7034bf0259fee164ba0f4b6a6ac3ef7d6bf30d6
Diffstat (limited to 'src')
-rw-r--r--src/shell.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/shell.c b/src/shell.c
index 40beef1..4f70dfc 100644
--- a/src/shell.c
+++ b/src/shell.c
@@ -576,6 +576,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);
@@ -623,9 +626,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;
}