Skip to content

Commit

Permalink
Merge pull request #84129 from SaracenOne/better_warning_for_track_hi…
Browse files Browse the repository at this point in the history
…nt_fail

Add descriptive warning for animation track hint fails.
  • Loading branch information
akien-mga committed Oct 30, 2023
2 parents ceaa833 + 8db9884 commit dcde5ba
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions editor/animation_track_editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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<PropertyInfo> pinfo;
property_info_base.get_property_list(&pinfo);

Expand Down

0 comments on commit dcde5ba

Please sign in to comment.