Skip to content

Commit

Permalink
Merge pull request #69259 from adamscott/fix-cyclic-reference-base-issue
Browse files Browse the repository at this point in the history
Fix cyclic reference base being loaded but not valid (which is ok)
  • Loading branch information
akien-mga authored Nov 28, 2022
2 parents ceca460 + 4e60689 commit 166066d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion modules/gdscript/gdscript_cache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ Ref<GDScript> GDScriptCache::get_full_script(const String &p_path, Error &r_erro
Ref<GDScript> script;
r_error = OK;
if (singleton->full_gdscript_cache.has(p_path)) {
script = Ref<GDScript>(singleton->full_gdscript_cache[p_path]);
script = singleton->full_gdscript_cache[p_path];
if (!p_update_from_disk) {
return script;
}
Expand Down
2 changes: 1 addition & 1 deletion modules/gdscript/gdscript_compiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2284,7 +2284,7 @@ Error GDScriptCompiler::_populate_class_members(GDScript *p_script, const GDScri
_set_error(vformat(R"(Could not find class "%s" in "%s".)", base->fully_qualified_name, base->path), nullptr);
return ERR_COMPILATION_FAILED;
}
ERR_FAIL_COND_V(!base->is_valid(), ERR_BUG);
ERR_FAIL_COND_V(!base->is_valid() && !base->reloading, ERR_BUG);
}

p_script->base = base;
Expand Down

0 comments on commit 166066d

Please sign in to comment.