summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorAnish <anishbhobe@hotmail.com>2019-03-11 14:07:07 +0530
committerAnish <anishbhobe@hotmail.com>2019-03-11 17:04:02 +0530
commitd6e4a08c614da72c4ade71f326b7b4cf33b53707 (patch)
tree10d0f6aae4b25cb0977c9d9c8333e0402d459027 /editor
parent91d3ea0d1f33af26328c741835a8ff72c58d34d7 (diff)
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
Diffstat (limited to 'editor')
-rw-r--r--editor/animation_track_editor.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/editor/animation_track_editor.cpp b/editor/animation_track_editor.cpp
index c561cdc249..8807a01f64 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