mirror of
https://github.com/godotengine/godot.git
synced 2025-01-15 06:22:27 +00:00
fix CollisonShape changing shape cause crash when not in a tree
This commit is contained in:
parent
84401e8cdf
commit
2206c5e9c0
@ -228,7 +228,7 @@ void CollisionShape::_update_debug_shape() {
|
||||
}
|
||||
|
||||
void CollisionShape::_shape_changed() {
|
||||
if (get_tree()->is_debugging_collisions_hint() && !debug_shape_dirty) {
|
||||
if (is_inside_tree() && get_tree()->is_debugging_collisions_hint() && !debug_shape_dirty) {
|
||||
debug_shape_dirty = true;
|
||||
call_deferred("_update_debug_shape");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user