diff --git a/modules/terrain/terrain_modifier.cpp b/modules/terrain/terrain_modifier.cpp index aa4c1909..50349cc9 100644 --- a/modules/terrain/terrain_modifier.cpp +++ b/modules/terrain/terrain_modifier.cpp @@ -27,7 +27,7 @@ void TerrainModifier::_notification(int what) { } void TerrainModifier::push_changed(Rect2 area) { - if (this->terrain) { + if (this->terrain && is_inside_tree() && is_ready()) { this->terrain->push_changed(area); } } diff --git a/modules/terrain/terrain_modifier_path.cpp b/modules/terrain/terrain_modifier_path.cpp index 523728ae..97b340a8 100644 --- a/modules/terrain/terrain_modifier_path.cpp +++ b/modules/terrain/terrain_modifier_path.cpp @@ -74,10 +74,9 @@ void TerrainModifierPath::_notification(int what) { case NOTIFICATION_READY: children_changed(); set_notify_transform(true); - update_bounds(); return; case NOTIFICATION_TRANSFORM_CHANGED: - if (is_inside_tree()) { + if (is_inside_tree() && is_ready()) { path_changed(); } return; @@ -172,6 +171,9 @@ void TerrainModifierPath::path_changed() { } } update_configuration_warnings(); + if (!is_ready()) { + return; + } if (!update_bounds()) { push_changed(get_bounds()); }