Fix null check in SceneAnimationWindow

The null-conditional operator checks for reference equality of the
Object, but doesn't check the unmanaged pointer validity.
This commit is contained in:
2023-09-25 22:05:37 +03:00
parent 310d61edda
commit ea201b6173

View File

@@ -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)
{