From 562fe84f6707f0a904c110cccbfb821c708314dd Mon Sep 17 00:00:00 2001 From: Relintai Date: Tue, 2 Jan 2024 13:05:52 +0100 Subject: [PATCH] Don't print error when there is no default NavigationMeshGenerator. --- servers/navigation/navigation_mesh_generator.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/servers/navigation/navigation_mesh_generator.cpp b/servers/navigation/navigation_mesh_generator.cpp index a89c75b42..48042682a 100644 --- a/servers/navigation/navigation_mesh_generator.cpp +++ b/servers/navigation/navigation_mesh_generator.cpp @@ -142,7 +142,9 @@ int NavigationMeshGeneratorManager::find_server_id(const String &p_name) const { } NavigationMeshGenerator *NavigationMeshGeneratorManager::new_default_server() const { - ERR_FAIL_COND_V(default_server_id == -1, nullptr); + if (default_server_id == -1) { + return NULL; + } NavigationMeshGenerator *gen = navigation_mesh_generators[default_server_id].create_callback();