summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/group_cmd.cpp3
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()