diff --git a/scene/2d/collision_shape_2d.cpp b/scene/2d/collision_shape_2d.cpp index cd89e914fb9..dbe9d7179c2 100644 --- a/scene/2d/collision_shape_2d.cpp +++ b/scene/2d/collision_shape_2d.cpp @@ -117,6 +117,9 @@ void CollisionShape2D::_notification(int p_what) { Color draw_col=get_tree()->get_debug_collisions_color(); + if(!shape.is_valid()) { + break; + } shape->draw(get_canvas_item(),draw_col);