summaryrefslogtreecommitdiff
path: root/scene/2d/collision_shape_2d.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/2d/collision_shape_2d.cpp')
-rw-r--r--scene/2d/collision_shape_2d.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/scene/2d/collision_shape_2d.cpp b/scene/2d/collision_shape_2d.cpp
index cd89e914fb..85751fc735 100644
--- a/scene/2d/collision_shape_2d.cpp
+++ b/scene/2d/collision_shape_2d.cpp
@@ -113,6 +113,10 @@ void CollisionShape2D::_notification(int p_what) {
break;
}
+ if (!shape.is_valid()) {
+ break;
+ }
+
rect=Rect2();