From 064ab31580d8e25d5deef7258eb80b418ec8277e Mon Sep 17 00:00:00 2001 From: Dino Date: Thu, 31 Jul 2025 15:44:22 -0400 Subject: [PATCH] RM #1641 fix crash in slot_selection_changed(), move nat_y++ --- client/gui-qt/pages.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/gui-qt/pages.cpp b/client/gui-qt/pages.cpp index 29f37ee37a..f5c086053b 100644 --- a/client/gui-qt/pages.cpp +++ b/client/gui-qt/pages.cpp @@ -1322,10 +1322,11 @@ void fc_client::slot_selection_changed(const QItemSelection &selected, while (true) { // Until breaks out const char *line = secfile_lookup_str_default(sf, nullptr, "player%d.map_t%04d", - curr_player, nat_y++); + curr_player, nat_y); if (line == nullptr) { break; } + nat_y++; nat_x = strlen(line); str_pixmap = str_pixmap + line; } -- 2.31.0