diff options
author | rubidium <rubidium@openttd.org> | 2008-07-23 18:41:15 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-07-23 18:41:15 +0000 |
commit | 1560fe3298ead7255f27ea899615ceb1612464bb (patch) | |
tree | 3206bca9c50a6f38405ef395c9f2efb99f09a256 /src/group_cmd.cpp | |
parent | c0e11a797c3ad92dabf3348d7246cc069aff76e9 (diff) | |
download | openttd-1560fe3298ead7255f27ea899615ceb1612464bb.tar.xz |
(svn r13807) -Fix: memory leak when loading groups.
Diffstat (limited to 'src/group_cmd.cpp')
-rw-r--r-- | src/group_cmd.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/group_cmd.cpp b/src/group_cmd.cpp index 43ccbe29f..331feda34 100644 --- a/src/group_cmd.cpp +++ b/src/group_cmd.cpp @@ -51,7 +51,8 @@ DEFINE_OLD_POOL_GENERIC(Group, Group) Group::Group(PlayerID owner) { this->owner = owner; - this->num_engines = CallocT<uint16>(GetEnginePoolSize()); + + if (this->IsValid()) this->num_engines = CallocT<uint16>(GetEnginePoolSize()); } Group::~Group() |