You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2026-01-07 19:53:17 +00:00
Check if shape is valid before referencing it
See the comment from @MartiniMoe at #2366.
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user