Skip to content

Commit

Permalink
Merge pull request #79163 from anvilfolk/fullscripterror
Browse files Browse the repository at this point in the history
GDScript: Add static analysis error reporting in GDScriptCache::get_full_script()
  • Loading branch information
YuriSizov committed Jul 14, 2023
2 parents f0c24f3 + 9550496 commit d5a30f7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion modules/gdscript/gdscript_cache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -294,16 +294,19 @@ Ref<GDScript> GDScriptCache::get_full_script(const String &p_path, Error &r_erro

if (p_update_from_disk) {
r_error = script->load_source_code(p_path);
if (r_error) {
return script;
}
}

r_error = script->reload(true);
if (r_error) {
return script;
}

singleton->full_gdscript_cache[p_path] = script;
singleton->shallow_gdscript_cache.erase(p_path);

script->reload(true);
return script;
}

Expand Down

0 comments on commit d5a30f7

Please sign in to comment.