summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2010-05-09 15:17:09 +0000
committeryexo <yexo@openttd.org>2010-05-09 15:17:09 +0000
commit96c1fd61735ecc73dea18bd1cdf58c18b3b1a5c8 (patch)
tree8a668aae2a8f136075d3064322f29d6f9b76087d
parenta53fb4814990746de63c5c0424455323d091d805 (diff)
downloadopenttd-96c1fd61735ecc73dea18bd1cdf58c18b3b1a5c8.tar.xz
(svn r19772) -Fix [FS#3818]: the break-on-log-message feature could trigger an assert (Zuu)
-rw-r--r--src/ai/ai_gui.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ai/ai_gui.cpp b/src/ai/ai_gui.cpp
index 609168414..57e8d0c24 100644
--- a/src/ai/ai_gui.cpp
+++ b/src/ai/ai_gui.cpp
@@ -1014,7 +1014,6 @@ struct AIDebugWindow : public QueryStringBaseWindow {
CompanyID old_company = _current_company;
_current_company = ai_debug_company;
AILog::LogData *log = (AILog::LogData *)AIObject::GetLogPointer();
- _current_company = old_company;
if (log != NULL && case_sensitive_break_check?
strstr(log->lines[log->pos], this->edit_str_buf) != 0 :
@@ -1032,6 +1031,8 @@ struct AIDebugWindow : public QueryStringBaseWindow {
/* Highlight row that matched */
this->highlight_row = log->pos;
}
+
+ _current_company = old_company;
}
}