Skip to content

Commit

Permalink
Update core/io/resource_loader.cpp
Browse files Browse the repository at this point in the history
Co-authored-by: Michael Russkikh <[email protected]>
  • Loading branch information
RandomShaper and Summersay415 authored Nov 4, 2024
1 parent 214deab commit aa296b5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion core/io/resource_loader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,12 @@ Ref<Resource> ResourceLoader::_load(const String &p_path, const String &p_origin

#ifdef TOOLS_ENABLED
Ref<FileAccess> file_check = FileAccess::create(FileAccess::ACCESS_RESOURCES);
ERR_FAIL_COND_V_MSG(!file_check->file_exists(p_path), Ref<Resource>(), vformat("Resource file not found: %s (expected type: %s)", p_path, p_type_hint));
if (!file_check->file_exists(p_path)) {
if (r_error) {
*r_error = ERR_FILE_NOT_FOUND;
}
ERR_FAIL_V_MSG(Ref<Resource>(), vformat("Resource file not found: %s (expected type: %s)", p_path, p_type_hint));
}
#endif

if (r_error) {
Expand Down

0 comments on commit aa296b5

Please sign in to comment.