소스 검색

Prevent a crash when calling AnimationMixer::restore when an invalid reference

jsjtxietian 1 년 전
부모
커밋
937411e152
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      scene/animation/animation_mixer.cpp

+ 1 - 0
scene/animation/animation_mixer.cpp

@@ -1980,6 +1980,7 @@ void AnimationMixer::reset() {
 }
 
 void AnimationMixer::restore(const Ref<AnimatedValuesBackup> &p_backup) {
+	ERR_FAIL_COND(p_backup.is_null());
 	track_cache = p_backup->get_data();
 	_blend_apply();
 	track_cache = HashMap<NodePath, AnimationMixer::TrackCache *>();