Fix crash in value comparison for deleted native scripting object that still has managed reference
#3365 #3374
This commit is contained in:
@@ -265,7 +265,7 @@ namespace FlaxEngine.Json
|
||||
|
||||
// Special case when saving reference to prefab object and the objects are different but the point to the same prefab object
|
||||
// In that case, skip saving reference as it's defined in prefab (will be populated via IdsMapping during deserialization)
|
||||
if (objA is SceneObject sceneA && objB is SceneObject sceneB && sceneA.HasPrefabLink && sceneB.HasPrefabLink)
|
||||
if (objA is SceneObject sceneA && objB is SceneObject sceneB && sceneA && sceneB && sceneA.HasPrefabLink && sceneB.HasPrefabLink)
|
||||
return sceneA.PrefabObjectID == sceneB.PrefabObjectID;
|
||||
|
||||
// Comparing an Int32 and Int64 both of the same value returns false, make types the same then compare
|
||||
|
||||
Reference in New Issue
Block a user