diff --git a/Client/game_sa/CDynamicPool.h b/Client/game_sa/CDynamicPool.h index 1f12deca6b..ac2380e316 100644 --- a/Client/game_sa/CDynamicPool.h +++ b/Client/game_sa/CDynamicPool.h @@ -76,7 +76,14 @@ class CDynamicPool return pool->AllocateItem(); } - return AllocateNewPart()->AllocateItem(); + try + { + return AllocateNewPart()->AllocateItem(); + } + catch (const std::bad_alloc&) + { + assert(false && "Could not allocate a memory for CDynamicPoolPart"); + } } void RemoveItem(PoolObjT* item)