De-serialise ResourceId default resource to NULL

Used during structured exporting
This commit is contained in:
Jake Turner
2022-03-29 05:37:18 +01:00
committed by Baldur Karlsson
parent ecb75feddb
commit 9271e44e23
+8 -5
View File
@@ -50,16 +50,19 @@ void DoSerialiseViaResourceId(SerialiserType &ser, type &el)
DoSerialise(ser, id);
if(ser.IsReading() && rm && !IsStructuredExporting(rm->GetState()))
if(ser.IsReading())
{
el = NULL;
if(id != ResourceId() && rm)
if(rm && !IsStructuredExporting(rm->GetState()))
{
if(rm->HasLiveResource(id))
if(id != ResourceId() && rm)
{
// we leave this wrapped.
el = (type)rm->GetLiveResource(id);
if(rm->HasLiveResource(id))
{
// we leave this wrapped.
el = (type)rm->GetLiveResource(id);
}
}
}
}