mirror of https://github.com/OpenTTD/OpenTTD
(svn r23746) -Fix: also set 'info' to NULL if 'instance' dies (for both AI and GS); avoids invalid memory reads
parent
00ec5da361
commit
251687f795
|
@ -104,6 +104,7 @@
|
||||||
|
|
||||||
delete c->ai_instance;
|
delete c->ai_instance;
|
||||||
c->ai_instance = NULL;
|
c->ai_instance = NULL;
|
||||||
|
c->ai_info = NULL;
|
||||||
|
|
||||||
cur_company.Restore();
|
cur_company.Restore();
|
||||||
|
|
||||||
|
|
|
@ -94,6 +94,7 @@
|
||||||
|
|
||||||
delete Game::instance;
|
delete Game::instance;
|
||||||
Game::instance = NULL;
|
Game::instance = NULL;
|
||||||
|
Game::info = NULL;
|
||||||
|
|
||||||
cur_company.Restore();
|
cur_company.Restore();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue