De-serialise ResourceId default resource to NULL

Used during structured exporting
This commit is contained in:
Jake Turner authored and Baldur Karlsson committed 2022-04-13 11:33:03 +01:00
1 parent ecb75feddb
commit 9271e44e23
1 file changed
+8 -5
+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);
}
}
}
}