You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2026-01-05 19:31:35 +00:00
Fix unexpected crashes in notification
(cherry picked from commit 924c2078da)
This commit is contained in:
@@ -133,6 +133,7 @@ void CollisionPolygon2D::_notification(int p_what) {
|
||||
} break;
|
||||
|
||||
case NOTIFICATION_DRAW: {
|
||||
ERR_FAIL_COND(!is_inside_tree());
|
||||
if (!Engine::get_singleton()->is_editor_hint() && !get_tree()->is_debugging_collisions_hint()) {
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -94,6 +94,8 @@ void CollisionShape2D::_notification(int p_what) {
|
||||
|
||||
} break;
|
||||
case NOTIFICATION_DRAW: {
|
||||
ERR_FAIL_COND(!is_inside_tree());
|
||||
|
||||
if (!Engine::get_singleton()->is_editor_hint() && !get_tree()->is_debugging_collisions_hint()) {
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -155,6 +155,7 @@ void RayCast2D::_notification(int p_what) {
|
||||
} break;
|
||||
|
||||
case NOTIFICATION_DRAW: {
|
||||
ERR_FAIL_COND(!is_inside_tree());
|
||||
if (!Engine::get_singleton()->is_editor_hint() && !get_tree()->is_debugging_collisions_hint()) {
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user