diff options
-rw-r--r-- | scene/2d/area_2d.cpp | 6 | ||||
-rw-r--r-- | servers/physics_2d/body_2d_sw.cpp | 3 |
2 files changed, 6 insertions, 3 deletions
diff --git a/scene/2d/area_2d.cpp b/scene/2d/area_2d.cpp index 5038752b22..eac3c0ce1a 100644 --- a/scene/2d/area_2d.cpp +++ b/scene/2d/area_2d.cpp @@ -383,7 +383,11 @@ void Area2D::_clear_monitoring() { Object *obj = ObjectDB::get_instance(E->key()); Node *node = obj ? obj->cast_to<Node>() : NULL; - ERR_CONTINUE(!node); + + if (!node) //node may have been deleted in previous frame, this should not be an error + continue; + //ERR_CONTINUE(!node); + if (!E->get().in_tree) continue; diff --git a/servers/physics_2d/body_2d_sw.cpp b/servers/physics_2d/body_2d_sw.cpp index 8d82d4a920..252c4fedd2 100644 --- a/servers/physics_2d/body_2d_sw.cpp +++ b/servers/physics_2d/body_2d_sw.cpp @@ -394,8 +394,7 @@ void Body2DSW::_compute_area_gravity_and_dampenings(const Area2DSW *p_area) { } area_linear_damp += p_area->get_linear_damp(); - area_angular_damp += p_area->get_angular_damp(); - printf("%f\n",gravity.y); + area_angular_damp += p_area->get_angular_damp(); } void Body2DSW::integrate_forces(real_t p_step) { |