mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 00:13:30 +00:00
GDScript: fix segfault on invalid script
This commit is contained in:
parent
c27f24da81
commit
9fa13da16f
2 changed files with 53 additions and 1 deletions
|
@ -3228,7 +3228,11 @@ Error GDScriptCompiler::compile(const GDScriptParser *p_parser, GDScript *p_scri
|
|||
GDScriptCache::add_static_script(p_script);
|
||||
}
|
||||
|
||||
return GDScriptCache::finish_compiling(main_script->path);
|
||||
err = GDScriptCache::finish_compiling(main_script->path);
|
||||
if (err) {
|
||||
main_script->valid = false;
|
||||
}
|
||||
return err;
|
||||
}
|
||||
|
||||
String GDScriptCompiler::get_error() const {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue