You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Avoid crashing in #23302
This commit is contained in:
@@ -685,6 +685,10 @@ bool AnimationTree::_update_caches(AnimationPlayer *player) {
|
|||||||
track = track_animation;
|
track = track_animation;
|
||||||
|
|
||||||
} break;
|
} break;
|
||||||
|
default: {
|
||||||
|
ERR_PRINT("Animation corrupted (invalid track type");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
track_cache[path] = track;
|
track_cache[path] = track;
|
||||||
@@ -853,6 +857,9 @@ void AnimationTree::_process_graph(float p_delta) {
|
|||||||
for (int i = 0; i < a->get_track_count(); i++) {
|
for (int i = 0; i < a->get_track_count(); i++) {
|
||||||
|
|
||||||
NodePath path = a->track_get_path(i);
|
NodePath path = a->track_get_path(i);
|
||||||
|
|
||||||
|
ERR_CONTINUE(!track_cache.has(path));
|
||||||
|
|
||||||
TrackCache *track = track_cache[path];
|
TrackCache *track = track_cache[path];
|
||||||
if (track->type != a->track_get_type(i)) {
|
if (track->type != a->track_get_type(i)) {
|
||||||
continue; //may happen should not
|
continue; //may happen should not
|
||||||
|
|||||||
Reference in New Issue
Block a user