diff options
author | yexo <yexo@openttd.org> | 2009-06-06 01:53:17 +0000 |
---|---|---|
committer | yexo <yexo@openttd.org> | 2009-06-06 01:53:17 +0000 |
commit | 59ae226ab1adf57f42075fa834237bd18c1b0adb (patch) | |
tree | 0fcb6f067b3b1a1b1cc64f34ddfa5e02a928c20e /src | |
parent | 4554c79b54a7f785370a2fd234af19dc70886bef (diff) | |
download | openttd-59ae226ab1adf57f42075fa834237bd18c1b0adb.tar.xz |
(svn r16522) -Fix [FS#2962]: possible assert in ai debug window when an AI was stopped an a human company took it's CompanyID
Diffstat (limited to 'src')
-rw-r--r-- | src/ai/ai_gui.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ai/ai_gui.cpp b/src/ai/ai_gui.cpp index 3f4746a02..8849dede0 100644 --- a/src/ai/ai_gui.cpp +++ b/src/ai/ai_gui.cpp @@ -660,7 +660,7 @@ struct AIDebugWindow : public Window { virtual void OnPaint() { /* Check if the currently selected company is still active. */ - if (ai_debug_company == INVALID_COMPANY || !Company::IsValidID(ai_debug_company)) { + if (ai_debug_company == INVALID_COMPANY || !Company::IsValidID(ai_debug_company) || !Company::Get(ai_debug_company)->is_ai) { if (ai_debug_company != INVALID_COMPANY) { /* Raise and disable the widget for the previous selection. */ this->RaiseWidget(ai_debug_company + AID_WIDGET_COMPANY_BUTTON_START); |