diff options
author | truebrain <truebrain@openttd.org> | 2012-01-03 23:09:48 +0000 |
---|---|---|
committer | truebrain <truebrain@openttd.org> | 2012-01-03 23:09:48 +0000 |
commit | 251687f795d0fe767ac52c6a9e5bfaa648919da2 (patch) | |
tree | 9d4549bd9454f391586cd541dae8c986d1355ce0 | |
parent | 00ec5da36161b2070fcf382a41f9d6b72ab6290f (diff) | |
download | openttd-251687f795d0fe767ac52c6a9e5bfaa648919da2.tar.xz |
(svn r23746) -Fix: also set 'info' to NULL if 'instance' dies (for both AI and GS); avoids invalid memory reads
-rw-r--r-- | src/ai/ai_core.cpp | 1 | ||||
-rw-r--r-- | src/game/game_core.cpp | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/src/ai/ai_core.cpp b/src/ai/ai_core.cpp index 6931accc7..ed2945cf3 100644 --- a/src/ai/ai_core.cpp +++ b/src/ai/ai_core.cpp @@ -104,6 +104,7 @@ delete c->ai_instance; c->ai_instance = NULL; + c->ai_info = NULL; cur_company.Restore(); diff --git a/src/game/game_core.cpp b/src/game/game_core.cpp index 566618040..00930cacc 100644 --- a/src/game/game_core.cpp +++ b/src/game/game_core.cpp @@ -94,6 +94,7 @@ delete Game::instance; Game::instance = NULL; + Game::info = NULL; cur_company.Restore(); |