diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-12-06 11:00:51 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-12-06 11:00:51 +0100 |
commit | 18f7461db85201655f89437383b358d909827097 (patch) | |
tree | 3036a3c87204062d93546392d5cb000ed8b3668d | |
parent | 75f8f22637ed588dc0383fac10d65a5f2253b20f (diff) | |
parent | 2af4f7f76256623d84fbe54a7cecbc96e7fd24c4 (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.cpp | 3 |
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(); |