From d6e4a08c614da72c4ade71f326b7b4cf33b53707 Mon Sep 17 00:00:00 2001 From: Anish Date: Mon, 11 Mar 2019 14:07:07 +0530 Subject: [PATCH] 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 --- editor/animation_track_editor.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/editor/animation_track_editor.cpp b/editor/animation_track_editor.cpp index c561cdc2495..8807a01f648 100644 --- a/editor/animation_track_editor.cpp +++ b/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