mirror of https://github.com/OpenTTD/OpenTTD
(svn r16174) -Fix (r16093) [FS#2863]: crash when starting a game/loading a game with no AIs available.
parent
c7715b263f
commit
bc8f31da4e
|
@ -256,15 +256,15 @@ void AIInstance::Died()
|
||||||
this->engine = NULL;
|
this->engine = NULL;
|
||||||
|
|
||||||
ShowAIDebugWindow(_current_company);
|
ShowAIDebugWindow(_current_company);
|
||||||
if (strcmp(GetCompany(_current_company)->ai_info->GetMainScript(), "%_dummy") != 0) {
|
|
||||||
ShowErrorMessage(INVALID_STRING_ID, STR_AI_PLEASE_REPORT_CRASH, 0, 0);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const AIInfo *info = AIConfig::GetConfig(_current_company)->GetInfo();
|
const AIInfo *info = AIConfig::GetConfig(_current_company)->GetInfo();
|
||||||
if (info->GetURL() != NULL) {
|
if (info != NULL) {
|
||||||
AILog::Info("Please report the error to the following URL:");
|
ShowErrorMessage(INVALID_STRING_ID, STR_AI_PLEASE_REPORT_CRASH, 0, 0);
|
||||||
AILog::Info(info->GetURL());
|
|
||||||
|
if (info->GetURL() != NULL) {
|
||||||
|
AILog::Info("Please report the error to the following URL:");
|
||||||
|
AILog::Info(info->GetURL());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue