From ea201b617326949d26b310b61ab56872a77ecca7 Mon Sep 17 00:00:00 2001 From: Ari Vuollet Date: Mon, 25 Sep 2023 22:05:37 +0300 Subject: [PATCH] Fix null check in SceneAnimationWindow The null-conditional operator checks for reference equality of the Object, but doesn't check the unmanaged pointer validity. --- Source/Editor/Windows/Assets/SceneAnimationWindow.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Editor/Windows/Assets/SceneAnimationWindow.cs b/Source/Editor/Windows/Assets/SceneAnimationWindow.cs index 824928743..0d7fa1c78 100644 --- a/Source/Editor/Windows/Assets/SceneAnimationWindow.cs +++ b/Source/Editor/Windows/Assets/SceneAnimationWindow.cs @@ -821,7 +821,7 @@ namespace FlaxEditor.Windows.Assets if (_timeline.IsModified) { var time = _timeline.CurrentTime; - var isPlaying = _previewPlayer?.IsPlaying ?? false; + var isPlaying = _previewPlayer != null ? _previewPlayer.IsPlaying : false; _timeline.Save(_asset); if (_previewButton.Checked && _previewPlayer != null) {