From f2ac39aec7566d49188a3d0e6617e68cbcef14f0 Mon Sep 17 00:00:00 2001
From: Marko Lindqvist <cazfi74@gmail.com>
Date: Mon, 7 Oct 2024 05:33:18 +0300
Subject: [PATCH 9/9] Fix client crash when Leaving the game to main menu

See RM #935

Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
---
 client/mapview_common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/client/mapview_common.c b/client/mapview_common.c
index 07dcf60a78..39508d8b20 100644
--- a/client/mapview_common.c
+++ b/client/mapview_common.c
@@ -427,7 +427,7 @@ static bool nuke_animation(struct animation *anim, double time_gone)
 ****************************************************************************/
 void update_animation(void)
 {
-  if (animation_list_size(animations) > 0) {
+  if (animations != NULL && animation_list_size(animations) > 0) {
     struct animation *anim = animation_list_get(animations, 0);
 
     if (anim->finished) {
-- 
2.45.2

