[PATCH weston 2/2] ivi-shell: Do not use animation code when no outputs are present

Armin Krezović krezovic.armin at gmail.com
Fri Aug 5 13:32:06 UTC 2016


It leads to crash when trying to select an output that drives
the animation.

Signed-off-by: Armin Krezović <krezovic.armin at gmail.com>
---
 ivi-shell/input-panel-ivi.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/ivi-shell/input-panel-ivi.c b/ivi-shell/input-panel-ivi.c
index 4c71cc7..b2a581b 100644
--- a/ivi-shell/input-panel-ivi.c
+++ b/ivi-shell/input-panel-ivi.c
@@ -94,10 +94,11 @@ show_input_panel_surface(struct input_panel_surface *ipsurf)
 	if (ipsurf->anim)
 		weston_view_animation_destroy(ipsurf->anim);
 
-	ipsurf->anim =
-		weston_slide_run(ipsurf->view,
-				 ipsurf->surface->height * 0.9, 0,
-				 input_panel_slide_done, ipsurf);
+	if (!wl_list_empty(&shell->compositor->output_list))
+		ipsurf->anim =
+			weston_slide_run(ipsurf->view,
+					 ipsurf->surface->height * 0.9, 0,
+					 input_panel_slide_done, ipsurf);
 }
 
 static void
-- 
2.9.2



More information about the wayland-devel mailing list