1From 4d4a99035f99231633d4bc281780d2a1ad66ed28 Mon Sep 17 00:00:00 2001 2From: Jeffy Chen <jeffy.chen@rock-chips.com> 3Date: Wed, 8 Jun 2022 09:53:19 +0800 4Subject: [PATCH 69/79] desktop-shell: Fix crash when destroying uncommited 5 surface 6 7By adding a sanity check for it's wsurface_anim_fade. 8 9Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com> 10--- 11 desktop-shell/shell.c | 4 +++- 12 1 file changed, 3 insertions(+), 1 deletion(-) 13 14diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c 15index eca22c6..bea4d1d 100644 16--- a/desktop-shell/shell.c 17+++ b/desktop-shell/shell.c 18@@ -275,7 +275,9 @@ desktop_shell_destroy_surface(struct shell_surface *shsurf) 19 weston_view_destroy(shsurf->view); 20 21 wl_signal_emit(&shsurf->destroy_signal, shsurf); 22- weston_surface_destroy(shsurf->wsurface_anim_fade); 23+ 24+ if (shsurf->wsurface_anim_fade) 25+ weston_surface_destroy(shsurf->wsurface_anim_fade); 26 27 if (shsurf->output_destroy_listener.notify) { 28 wl_list_remove(&shsurf->output_destroy_listener.link); 29-- 302.20.1 31 32