소스 검색

Prevents a Null Reference in deleting Animations.

A null Animation would cause a crash by accessing restricted memory.
Solved by checking if the animation track is null before using the
animation.

Fixes: #26829
Anish 6 년 전
부모
커밋
d6e4a08c61
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      editor/animation_track_editor.cpp

+ 4 - 0
editor/animation_track_editor.cpp

@@ -3424,6 +3424,10 @@ void AnimationTrackEditor::_animation_update() {
 
 	bool same = true;
 
+	if (animation.is_null()) {
+		return;
+	}
+
 	if (track_edits.size() == animation->get_track_count()) {
 		//check tracks are the same