summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-12-06 11:00:51 +0100
committerRémi Verschelde <rverschelde@gmail.com>2022-12-06 11:00:51 +0100
commit18f7461db85201655f89437383b358d909827097 (patch)
tree3036a3c87204062d93546392d5cb000ed8b3668d
parent75f8f22637ed588dc0383fac10d65a5f2253b20f (diff)
parent2af4f7f76256623d84fbe54a7cecbc96e7fd24c4 (diff)
Merge pull request #69606 from red1939/bug/vscode_crash
Keep GDScriptAnalyzer alive for whole parse()
-rw-r--r--modules/gdscript/language_server/gdscript_extend_parser.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/gdscript/language_server/gdscript_extend_parser.cpp b/modules/gdscript/language_server/gdscript_extend_parser.cpp
index de3becbaf8..e442bf8159 100644
--- a/modules/gdscript/language_server/gdscript_extend_parser.cpp
+++ b/modules/gdscript/language_server/gdscript_extend_parser.cpp
@@ -844,8 +844,9 @@ Error ExtendGDScriptParser::parse(const String &p_code, const String &p_path) {
lines = p_code.split("\n");
Error err = GDScriptParser::parse(p_code, p_path, false);
+ GDScriptAnalyzer analyzer(this);
+
if (err == OK) {
- GDScriptAnalyzer analyzer(this);
err = analyzer.analyze();
}
update_diagnostics();