-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Fix crash when clicking on "Interpolation Mode" with nonexistent node path #81779
Fix crash when clicking on "Interpolation Mode" with nonexistent node path #81779
Conversation
31c7c07
to
ab68f6a
Compare
Normaly the typo is fixed to respect the clang format, lets cross fingers |
21ca76d
to
f2596c7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it makes a lot of sense to do this check. This code generally doesn't touch nodes within the scene
This is the only place in the code that does either call to get_node()
which is a big warning flag, so we need to be extra safe in this part of the code.
Your change is good, and I propose one additional check to be extra safe on top of what you already did.
f2596c7
to
7a1deec
Compare
a126109
to
2d0f6be
Compare
Please update your commit title to be more descriptive, the title of the PR is good Also remove the "fixed conflict" part |
… 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
2d0f6be
to
e7a35d1
Compare
I have edited the commit title to correspond to the PR title as asked |
Thanks! And congrats for your first merged Godot contribution 🎉 |
With this commit, we found a bug, after you moved a node, animationplayer lost it's path. does it execute when node in / out of tree? |
@harrisyu Please report your bug as a new issue with a reproduction project attached. |
Cherry-picked for 4.1.4. |
#81769 AnimationPlayer: Editor crashes when clicking on "Interpolation Mode" with nonexistent node path
Which then prevents the crash and leave the PropertyInfo prop_info blank default, so when we reach next instruction
we will have prop_info.type = NIL and
prop_info.hint_string.find("radians") will return -1 since it is empty
So is_angle will be set to false and the code can continue to execute normaly without any crash