From 0f10db9d92cd0852ba9d5d90d69c3d6015c2b407 Mon Sep 17 00:00:00 2001 From: Iurii Chernyi Date: Fri, 30 Mar 2012 15:54:49 +0000 Subject: [PATCH] Fixed bug #19538: Filters matching 0 saved games cause crash. Patch #3220 by trademark --- changelog | 1 + data/core/about.cfg | 4 ++++ src/dialogs.cpp | 3 ++- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/changelog b/changelog index ba68a529673..3dc295b75ea 100644 --- a/changelog +++ b/changelog @@ -119,6 +119,7 @@ Version 1.11.0-svn: * Re-fogging does not occur in the middle of the player's turn. * Fixed provided saved game filenames being ignored when requesting to save a MP game due to a network or OOS error (bug #19562) + * Fixed bug #19538: Filters matching 0 saved games cause crash * Whiteboard * Fixed bug #19369: Using planning mode can cause losing ability to move my units * Fixed bug #19408: Crash shortly after executing invalid multi-turn move diff --git a/data/core/about.cfg b/data/core/about.cfg index f11aedf1248..7469d5e55fb 100644 --- a/data/core/about.cfg +++ b/data/core/about.cfg @@ -1178,6 +1178,10 @@ comment = "WML validation" email = "nsytyi_AT_gmail.com" [/entry] + [entry] + name = "Talbot Pierre (Trademark)" + email = "ptablot@mopong.net" + [/entry] [entry] name = "Tamas K. (negusnyul)" [/entry] diff --git a/src/dialogs.cpp b/src/dialogs.cpp index dc95e6695bb..77cda64c605 100644 --- a/src/dialogs.cpp +++ b/src/dialogs.cpp @@ -330,7 +330,8 @@ public: void draw_contents(); void set_selection(int index) { - index_ = textbox_.get_index(index); + int res = textbox_.get_index(index); + index_ = (res >= 0) ? res : index_; set_dirty(); }