From 937411e152f5e84c0f4a59d59e2a813ecda8dd06 Mon Sep 17 00:00:00 2001 From: jsjtxietian Date: Tue, 28 Nov 2023 12:54:06 +0800 Subject: [PATCH] Prevent a crash when calling AnimationMixer::restore when an invalid reference --- scene/animation/animation_mixer.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/scene/animation/animation_mixer.cpp b/scene/animation/animation_mixer.cpp index dbd790003a81..5783c8b85023 100644 --- a/scene/animation/animation_mixer.cpp +++ b/scene/animation/animation_mixer.cpp @@ -1980,6 +1980,7 @@ void AnimationMixer::reset() { } void AnimationMixer::restore(const Ref &p_backup) { + ERR_FAIL_COND(p_backup.is_null()); track_cache = p_backup->get_data(); _blend_apply(); track_cache = HashMap();