diff options
-rw-r--r-- | src/ai/ai_core.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ai/ai_core.cpp b/src/ai/ai_core.cpp index 8d333877f..ab950ef06 100644 --- a/src/ai/ai_core.cpp +++ b/src/ai/ai_core.cpp @@ -48,13 +48,15 @@ config->ChangeAI(info->GetName(), -1, false, true); } - _current_company = company; + Backup<CompanyByte> cur_company(_current_company, company, FILE_LINE); Company *c = Company::Get(company); c->ai_info = info; assert(c->ai_instance == NULL); c->ai_instance = new AIInstance(info); + cur_company.Restore(); + InvalidateWindowData(WC_AI_DEBUG, 0, -1); return; } |