Merge pull request #112969 from ashwinvbs/bugfix

Fix bug where optional argument is not validated before use
This commit is contained in:
Thaddeus Crews
2025-11-20 11:10:49 -06:00

View File

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