From bbdf37b7a295ecb067e26546c2b99b8e6bccc987 Mon Sep 17 00:00:00 2001 From: HolonProduction Date: Tue, 28 Oct 2025 18:12:59 +0100 Subject: [PATCH] LSP: Fix remaining unsave dict access --- .../gdscript/language_server/gdscript_language_protocol.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/gdscript/language_server/gdscript_language_protocol.cpp b/modules/gdscript/language_server/gdscript_language_protocol.cpp index 7e19fa8e731..0bf73a1ed62 100644 --- a/modules/gdscript/language_server/gdscript_language_protocol.cpp +++ b/modules/gdscript/language_server/gdscript_language_protocol.cpp @@ -177,7 +177,7 @@ Dictionary GDScriptLanguageProtocol::initialize(const Dictionary &p_params) { String root; Variant root_uri_var = p_params["rootUri"]; - Variant root_var = p_params["rootPath"]; + Variant root_var = p_params.get("rootPath", Variant()); if (root_uri_var.is_string()) { root = get_workspace()->get_file_path(root_uri_var); } else if (root_var.is_string()) { @@ -194,7 +194,7 @@ Dictionary GDScriptLanguageProtocol::initialize(const Dictionary &p_params) { } String root_uri = p_params["rootUri"]; - String root = p_params["rootPath"]; + String root = p_params.get("rootPath", ""); bool is_same_workspace; #ifndef WINDOWS_ENABLED is_same_workspace = root.to_lower() == workspace->root.to_lower();