From 96c1fd61735ecc73dea18bd1cdf58c18b3b1a5c8 Mon Sep 17 00:00:00 2001 From: yexo Date: Sun, 9 May 2010 15:17:09 +0000 Subject: (svn r19772) -Fix [FS#3818]: the break-on-log-message feature could trigger an assert (Zuu) --- src/ai/ai_gui.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; } } -- cgit v1.2.3-70-g09d2