summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-05-06 10:42:56 +0200
committerGitHub <noreply@github.com>2019-05-06 10:42:56 +0200
commit563d4b0e7f88622765138cbdace5bfc05bf2240b (patch)
treedc0286260d46a725fe738aff562c5c643d9e4f94 /scene
parent1a3a0e3d953bd716f128f0f73261e02058e00a4c (diff)
parent2206c5e9c0d531b3186c6acf4f16327682721900 (diff)
Merge pull request #28696 from raphael10241024/debug_fix
fix CollisonShape changing shape cause crash when not in a tree
Diffstat (limited to 'scene')
-rw-r--r--scene/3d/collision_shape.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/3d/collision_shape.cpp b/scene/3d/collision_shape.cpp
index 6bb2b547c7..f32b1398fd 100644
--- a/scene/3d/collision_shape.cpp
+++ b/scene/3d/collision_shape.cpp
@@ -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");
}