-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AnimationPlayer: Editor crashes when clicking on "Interpolation Mode" with nonexistent node path #81769
Comments
That should be an easy fix, it is a null point not checked in animation_trackeditor.cpp line 2698 int he function then we call this line without checking if the node pointer "nd" is not null
|
I will read a bit about the coding policy for the godot coding style etc and see if i find some free time to push a fix, then pull request , unless someone else do it first <_< |
… path issue reference [godotengine#81769] godotengine#81769 AnimationPlayer: Editor crashes when clicking on "Interpolation Mode" with nonexistent node path - adding a nullptr check on a Node pointer obtained from get_node(NodePath) in case it is null now we wont execute the next instruction > ClassDB::get_property_info(nd->get_class(), prop, &prop_info); Which then prevents the crash
… path issue reference [godotengine#81769] godotengine#81769 AnimationPlayer: Editor crashes when clicking on "Interpolation Mode" with nonexistent node path - adding a nullptr check on a Node pointer obtained from get_node(NodePath) in case it is null now we wont execute the next instruction > ClassDB::get_property_info(nd->get_class(), prop, &prop_info); Which then prevents the crash
… path issue reference [godotengine#81769] godotengine#81769 AnimationPlayer: Editor crashes when clicking on "Interpolation Mode" with nonexistent node path - adding a nullptr check on a Node pointer obtained from get_node(NodePath) in case it is null now we wont execute the next instruction > ClassDB::get_property_info(nd->get_class(), prop, &prop_info); Which then prevents the crash
… path issue reference [godotengine#81769] - adding a nullptr check on a Node pointer obtained from get_node(NodePath) in case it is null now we wont execute the next instruction > ClassDB::get_property_info(nd->get_class(), prop, &prop_info); Which then prevents the crash (cherry picked from commit e7a35d1)
Godot version
4.1.1.stable
System information
Ubuntu 22.04
Issue description
The editor crashes when clicking on "Interpolation Mode" when a path points to a none-existing
NodePath
. I noticed this issue when I duplicated anAnimationPlayer
from one scene to another.I expect some sort of error message but not a crash.
Steps to reproduce
Create a new project with a simple scene and add an
AnimationPlayer
as a child node. Change a path (tracks/0/path) to something that doesn't exist. Click on the button for "Interpolation Mode".Minimal reproduction project
AnimationPlayerCrash.zip
The text was updated successfully, but these errors were encountered: