From 943c006875083d46831d0a4678b4433b3f09e939 Mon Sep 17 00:00:00 2001
From: Marko Lindqvist <cazfi74@gmail.com>
Date: Fri, 16 Oct 2026 17:28:00 +0300
Subject: [PATCH 35/35] gtk4: Fix crash when pointer leaves map while goto
 setup active

Reported by Eelis Vuokko

See RM #2368

Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
---
 client/gui-gtk-4.0/mapctrl.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/client/gui-gtk-4.0/mapctrl.c b/client/gui-gtk-4.0/mapctrl.c
index ac7f57a67b..fc69893592 100644
--- a/client/gui-gtk-4.0/mapctrl.c
+++ b/client/gui-gtk-4.0/mapctrl.c
@@ -454,7 +454,11 @@ gboolean leave_mapcanvas(GtkEventControllerMotion *controller,
                          gpointer data)
 {
   update_mouse_cursor(CURSOR_DEFAULT);
-  update_unit_info_label(get_units_in_focus());
+
+  /* Here used to be update_unit_info_label() call here,
+   * but it sometimes crashed in goto_get_turns() when
+   * goto setup was active. It was not obvious why
+   * the call would be needed here. We just removed it. */
 
   return TRUE;
 }
-- 
2.53.0

