Merge pull request #69606 from red1939/bug/vscode_crash

Keep GDScriptAnalyzer alive for whole parse()
This commit is contained in:
Rémi Verschelde 2022-12-06 11:00:51 +01:00
commit 18f7461db8
No known key found for this signature in database
GPG Key ID: C3336907360768E1

View File

@ -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();