Move the shape test to a little sooner

This commit is contained in:
George Marques 2015-09-22 21:30:08 -03:00
parent e68f04b9d0
commit 5ff0b69dae
No known key found for this signature in database
GPG key ID: 046BD46A3201E43D

View file

@ -113,13 +113,14 @@ void CollisionShape2D::_notification(int p_what) {
break; break;
} }
if (!shape.is_valid()) {
break;
}
rect=Rect2(); rect=Rect2();
Color draw_col=get_tree()->get_debug_collisions_color(); Color draw_col=get_tree()->get_debug_collisions_color();
if(!shape.is_valid()) {
break;
}
shape->draw(get_canvas_item(),draw_col); shape->draw(get_canvas_item(),draw_col);