From 44357ddc28351c530358fab37ea49a96288d6d27 Mon Sep 17 00:00:00 2001 From: Rémi Verschelde Date: Mon, 28 Dec 2020 19:51:39 +0100 Subject: Editor: Fix invalid use of Node::get_viewport() after rename of EditorNode::get_viewport() Fixes #44761, was a regression from #44524. The PR passed CI because EditorNode::get_viewport() used to shadow Node::get_viewport() (which was a bug in itself, fixed by #44524), so once it was renamed the existing code relying on it fell back to the now available Node::get_viewport(). This might bite some thirdparty modules too. --- modules/gdnavigation/navigation_mesh_editor_plugin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/gdnavigation/navigation_mesh_editor_plugin.cpp b/modules/gdnavigation/navigation_mesh_editor_plugin.cpp index 648f4f7cdd..2d3be7b071 100644 --- a/modules/gdnavigation/navigation_mesh_editor_plugin.cpp +++ b/modules/gdnavigation/navigation_mesh_editor_plugin.cpp @@ -142,7 +142,7 @@ void NavigationMeshEditorPlugin::make_visible(bool p_visible) { NavigationMeshEditorPlugin::NavigationMeshEditorPlugin(EditorNode *p_node) { editor = p_node; navigation_mesh_editor = memnew(NavigationMeshEditor); - editor->get_viewport()->add_child(navigation_mesh_editor); + editor->get_main_control()->add_child(navigation_mesh_editor); add_control_to_container(CONTAINER_SPATIAL_EDITOR_MENU, navigation_mesh_editor->bake_hbox); navigation_mesh_editor->hide(); navigation_mesh_editor->bake_hbox->hide(); -- cgit v1.2.3