- fixed: The serializer must treat object that were already destroyed or are declared transient like a null pointer and not ignore them.

This caused FraggleScript's SpawnedThings array to go out of sync.
This commit is contained in:
Christoph Oelckers 2018-11-25 22:12:21 +01:00
parent d30bf44dcc
commit d79ef939e9

View file

@ -1586,17 +1586,13 @@ FSerializer &Serialize(FSerializer &arc, const char *key, DObject *&value, DObje
if (retcode) *retcode = true;
if (arc.isWriting())
{
if (value != nullptr)
if (value != nullptr && !(value->ObjectFlags & (OF_EuthanizeMe | OF_Transient)))
{
int ndx;
if (value == WP_NOCHANGE)
{
ndx = -1;
}
else if (value->ObjectFlags & (OF_EuthanizeMe | OF_Transient))
{
return arc;
}
else
{
int *pndx = arc.w->mObjectMap.CheckKey(value);