-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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 CSGShape debug_collision_shape
crash
#84338
Conversation
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.
What about print some warning with the origin comment as it's content ?
Fixes CSGShape debug_collision_shape crash.
a44117c
to
0cba21f
Compare
I am not sure. Do people benefit from a printed warning here about this? The original comment was a code comment, not directed or with useful information for engine users in particular, and now the if check basically tells the same story. |
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.
Haven't verified but should cover the cases (the validity of get_world_3d
should be covered by the is_inside_tree
check, but might be incomplete)
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.
Seems in line with other checks in this class, if not a bit excessive.
Thanks! |
Should be cherry picked, see: |
debug_collision_shape
crash
Cherry-picked for 4.1.4. |
Fixes CSGShape debug_collision_shape crash.
Fixes #84304
While the immediate crash source was
root_collision_shape
being null I also do not trust a function that does not guard itself against crashes from e.g.get_world_3d()
orget_global_transform()
. In fact the only guard was a well-meaning comment.