From 8db9884dd5828f6a1da94072f17253a92b24e6d9 Mon Sep 17 00:00:00 2001 From: Saracen Date: Sun, 29 Oct 2023 00:23:48 +0100 Subject: [PATCH] Add descriptive warning for animation track hint fails. --- editor/animation_track_editor.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/editor/animation_track_editor.cpp b/editor/animation_track_editor.cpp index a2011144ce0e..cf36a42be40f 100644 --- a/editor/animation_track_editor.cpp +++ b/editor/animation_track_editor.cpp @@ -31,6 +31,7 @@ #include "animation_track_editor.h" #include "animation_track_editor_plugins.h" +#include "core/error/error_macros.h" #include "core/input/input.h" #include "editor/animation_bezier_editor.h" #include "editor/editor_node.h" @@ -4107,6 +4108,12 @@ PropertyInfo AnimationTrackEditor::_find_hint_for_track(int p_idx, NodePath &r_b property_info_base = property_info_base.get_named(leftover_path[i], valid); } + if (property_info_base.is_null()) { + WARN_PRINT(vformat("Could not determine track hint for '%s:%s' because its base property is null.", + String(path.get_concatenated_names()), String(path.get_concatenated_subnames()))); + return PropertyInfo(); + } + List pinfo; property_info_base.get_property_list(&pinfo);