diff --git a/Source/Editor/CustomEditors/Editors/ObjectSwitcherEditor.cs b/Source/Editor/CustomEditors/Editors/ObjectSwitcherEditor.cs index d32f08c92..09670f1b2 100644 --- a/Source/Editor/CustomEditors/Editors/ObjectSwitcherEditor.cs +++ b/Source/Editor/CustomEditors/Editors/ObjectSwitcherEditor.cs @@ -180,7 +180,7 @@ namespace FlaxEditor.CustomEditors.Editors // Show prefab diff when reference value type is different var color = Color.Transparent; - if (Values.HasReferenceValue && CanRevertReferenceValue && Values[0].GetType() != Values.ReferenceValue.GetType()) + if (Values.HasReferenceValue && CanRevertReferenceValue && Values[0]?.GetType() != Values.ReferenceValue?.GetType()) color = FlaxEngine.GUI.Style.Current.BackgroundSelected; _typeItem.Labels[0].HighlightStripColor = color;