- Add PClass::AllClasses to the list of root items for the GC. Failure to do so will cause any

actors with names that conflicted with preceding actors from being freed, even though they
  can still be accessed via PClassActor::AllActorClasses, which gets iterated over in a number
  of places. (e.g. Zen Dynamics defines a Grenade actor, although there is one in zdoom.pk3 now.
  The Zen Dynamics' version would not go in the TypeTable, so it would be collected on map load,
  leading to a crash when attempts to access it through AllActorClasses are made.)

SVN r3908 (scripting)
This commit is contained in:
Randy Heit 2012-10-26 19:52:24 +00:00
parent 1a02d16356
commit aade32a749
2 changed files with 4 additions and 1 deletions

View file

@ -365,6 +365,10 @@ static void MarkRoot()
} }
// Mark types // Mark types
TypeTable.Mark(); TypeTable.Mark();
for (unsigned int i = 0; i < PClass::AllClasses.Size(); ++i)
{
Mark(PClass::AllClasses[i]);
}
// Mark bot stuff. // Mark bot stuff.
Mark(bglobal.firstthing); Mark(bglobal.firstthing);
Mark(bglobal.body1); Mark(bglobal.body1);

View file

@ -3964,7 +3964,6 @@ static int DoFindState(VMFrameStack *stack, VMValue *param, int numparam, VMRetu
} }
ret->SetPointer(state, ATAG_STATE); ret->SetPointer(state, ATAG_STATE);
return 1; return 1;
} }
// Find a state with any number of dots in its name. // Find a state with any number of dots in its name.