1
0
mirror of https://github.com/godotengine/godot.git synced 2025-12-02 16:48:55 +00:00

Fix bug where optional argument is not validated before use

This commit is contained in:
Ashwin Balasubramaniyan
2025-11-19 13:19:29 -05:00
parent 68410acc61
commit 6e047a0287

View File

@@ -1554,7 +1554,9 @@ Ref<Resource> ResourceFormatLoaderJSON::load(const String &p_path, const String
} }
if (!FileAccess::exists(p_path)) { if (!FileAccess::exists(p_path)) {
if (r_error) {
*r_error = ERR_FILE_NOT_FOUND; *r_error = ERR_FILE_NOT_FOUND;
}
return Ref<Resource>(); return Ref<Resource>();
} }