Skip to content

Commit

Permalink
Merge pull request #69606 from red1939/bug/vscode_crash
Browse files Browse the repository at this point in the history
Keep GDScriptAnalyzer alive for whole parse()
  • Loading branch information
akien-mga committed Dec 6, 2022
2 parents 75f8f22 + 2af4f7f commit 18f7461
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion modules/gdscript/language_server/gdscript_extend_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 18f7461

Please sign in to comment.