Added check for SceneTree being null
This commit is contained in:
parent
7f9a82b944
commit
51501dadcc
|
@ -462,6 +462,10 @@ void Viewport::_notification(int p_what) {
|
|||
RenderingServer::get_singleton()->viewport_set_parent_viewport(viewport, RID());
|
||||
} break;
|
||||
case NOTIFICATION_INTERNAL_PHYSICS_PROCESS: {
|
||||
if (!get_tree()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (get_tree()->is_debugging_collisions_hint() && contact_2d_debug.is_valid()) {
|
||||
RenderingServer::get_singleton()->canvas_item_clear(contact_2d_debug);
|
||||
RenderingServer::get_singleton()->canvas_item_set_draw_index(contact_2d_debug, 0xFFFFF); //very high index
|
||||
|
|
Loading…
Reference in New Issue