diff --git a/Assets/NaughtyAttributes/Scripts/Editor/Utility/NaughtyEditorGUI.cs b/Assets/NaughtyAttributes/Scripts/Editor/Utility/NaughtyEditorGUI.cs index 08d77860..19584aa6 100644 --- a/Assets/NaughtyAttributes/Scripts/Editor/Utility/NaughtyEditorGUI.cs +++ b/Assets/NaughtyAttributes/Scripts/Editor/Utility/NaughtyEditorGUI.cs @@ -121,7 +121,8 @@ public static void Dropdown( int newIndex = EditorGUI.Popup(rect, label, selectedValueIndex, displayOptions); object newValue = values[newIndex]; - if (!dropdownField.GetValue(target).Equals(newValue)) + object dropdownValue = dropdownField.GetValue(target); + if (dropdownValue == null || !dropdownValue.Equals(newValue)) { Undo.RecordObject(serializedObject.targetObject, "Dropdown");