Skip to content

Godot 3.5: AnimationPlayer Animation window: deleting last track causes spurious error "Index track = N is out of bounds (animation->get_track_count() = N)" #79587

Description

@hsandt

Godot version

v3.5.2.stable.official [170ba33]

System information

Linux Ubuntu 22.04 with Unity desktop

Issue description

Note: I did not test this with Godot 4, but I don't remember having it on Godot 4 either

When I delete the last track of some animation on my Animation Player in the Animation window, I get the following error:

editor/animation_track_editor.cpp:1850 - Index track = N is out of bounds (animation->get_track_count() = N).

where N is the index of the removed track.

It's as if the index was checked after removing the track instead of before.

Steps to reproduce

  1. Create an AnimationPlayer + some Animation with some tracks
  2. Delete the last track

Minimal reproduction project

N/A

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions