- fixed: When a bogus class is deleted from AllActorClasses, the entry should also be removed from the array instead of leaving a null pointer behind.

This commit is contained in:
Christoph Oelckers 2016-11-30 19:48:52 +01:00
parent 07c110d5f7
commit 0233c21e33

View file

@ -387,8 +387,9 @@ void LoadActors ()
}
FScriptPosition::ResetErrorCounter();
for (auto ti : PClassActor::AllActorClasses)
for (int i = PClassActor::AllActorClasses.Size()-1; i>=0;i--)
{
auto ti = PClassActor::AllActorClasses[i];
if (ti->Size == TentativeClass)
{
if (ti->ObjectFlags & OF_Transient)
@ -400,6 +401,7 @@ void LoadActors ()
{
if (*op == ti) *op = nullptr;
}
PClassActor::AllActorClasses.Delete(i);
}
else
{