mirror of https://github.com/OpenTTD/OpenTTD
(svn r13807) -Fix: memory leak when loading groups.
parent
c0e11a797c
commit
1560fe3298
|
@ -51,7 +51,8 @@ DEFINE_OLD_POOL_GENERIC(Group, Group)
|
||||||
Group::Group(PlayerID owner)
|
Group::Group(PlayerID owner)
|
||||||
{
|
{
|
||||||
this->owner = owner;
|
this->owner = owner;
|
||||||
this->num_engines = CallocT<uint16>(GetEnginePoolSize());
|
|
||||||
|
if (this->IsValid()) this->num_engines = CallocT<uint16>(GetEnginePoolSize());
|
||||||
}
|
}
|
||||||
|
|
||||||
Group::~Group()
|
Group::~Group()
|
||||||
|
|
Loading…
Reference in New Issue