- Fixed crash with corpse queueing.

This commit is contained in:
Major Cooke 2017-04-15 09:33:04 -05:00 committed by Christoph Oelckers
parent 1ee9256842
commit 259e3127fe

View file

@ -125,16 +125,19 @@ DCorpsePointer::DCorpsePointer (AActor *ptr)
TThinkerIterator<DCorpsePointer> iterator (STAT_CORPSEPOINTER);
DCorpsePointer *first = iterator.Next ();
if (first != nullptr)
{
if (first != this)
{
if (first->Count >= (uint32_t)sv_corpsequeuesize)
{
DCorpsePointer *next = iterator.Next ();
first->Destroy ();
DCorpsePointer *next = iterator.Next();
first->Destroy();
first = next;
}
}
++first->Count;
}
}
void DCorpsePointer::OnDestroy ()