diff options
author | frosch <frosch@openttd.org> | 2010-06-05 12:16:12 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2010-06-05 12:16:12 +0000 |
commit | 1d3adb2b66989630b2a3c201ac1210a886d41a51 (patch) | |
tree | c7c2c22646cfdeb1312455bfd9d59674b7ff96be /src/ai/ai_gui.cpp | |
parent | 406c2a986571ce594f491c0fde225b89f14ac8c3 (diff) | |
download | openttd-1d3adb2b66989630b2a3c201ac1210a886d41a51.tar.xz |
(svn r19931) -Fix (r19914): Convert assertion in Backup<> destructor into DEBUG() output. It was triggered on exceptions, especially when aborting world generation.
Diffstat (limited to 'src/ai/ai_gui.cpp')
-rw-r--r-- | src/ai/ai_gui.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ai/ai_gui.cpp b/src/ai/ai_gui.cpp index afad432f6..91ebe0781 100644 --- a/src/ai/ai_gui.cpp +++ b/src/ai/ai_gui.cpp @@ -820,7 +820,7 @@ struct AIDebugWindow : public QueryStringBaseWindow { DrawCompanyIcon(i, button->pos_x + button->current_x / 2 - 7 + offset, this->GetWidget<NWidgetBase>(AID_WIDGET_COMPANY_BUTTON_START + i)->pos_y + 2 + offset); } - Backup<CompanyByte> cur_company(_current_company, ai_debug_company); + Backup<CompanyByte> cur_company(_current_company, ai_debug_company, FILE_LINE); AILog::LogData *log = (AILog::LogData *)AIObject::GetLogPointer(); cur_company.Restore(); @@ -875,7 +875,7 @@ struct AIDebugWindow : public QueryStringBaseWindow { switch (widget) { case AID_WIDGET_LOG_PANEL: { - Backup<CompanyByte> cur_company(_current_company, ai_debug_company); + Backup<CompanyByte> cur_company(_current_company, ai_debug_company, FILE_LINE); AILog::LogData *log = (AILog::LogData *)AIObject::GetLogPointer(); cur_company.Restore(); if (log == NULL) return; @@ -914,7 +914,7 @@ struct AIDebugWindow : public QueryStringBaseWindow { this->RaiseWidget(ai_debug_company + AID_WIDGET_COMPANY_BUTTON_START); ai_debug_company = show_ai; - Backup<CompanyByte> cur_company(_current_company, ai_debug_company); + Backup<CompanyByte> cur_company(_current_company, ai_debug_company, FILE_LINE); AILog::LogData *log = (AILog::LogData *)AIObject::GetLogPointer(); cur_company.Restore(); this->vscroll.SetCount((log == NULL) ? 0 : log->used); @@ -1009,7 +1009,7 @@ struct AIDebugWindow : public QueryStringBaseWindow { /* If the log message is related to the active company tab, check the break string */ if (data == ai_debug_company && this->break_check_enabled && !StrEmpty(this->edit_str_buf)) { /* Get the log instance of the active company */ - Backup<CompanyByte> cur_company(_current_company, ai_debug_company); + Backup<CompanyByte> cur_company(_current_company, ai_debug_company, FILE_LINE); AILog::LogData *log = (AILog::LogData *)AIObject::GetLogPointer(); if (log != NULL && case_sensitive_break_check? |