mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Merge pull request #112969 from ashwinvbs/bugfix
Fix bug where optional argument is not validated before use
This commit is contained in:
commit
a79b155298
1 changed files with 3 additions and 1 deletions
|
|
@ -1554,7 +1554,9 @@ Ref<Resource> ResourceFormatLoaderJSON::load(const String &p_path, const String
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!FileAccess::exists(p_path)) {
|
if (!FileAccess::exists(p_path)) {
|
||||||
*r_error = ERR_FILE_NOT_FOUND;
|
if (r_error) {
|
||||||
|
*r_error = ERR_FILE_NOT_FOUND;
|
||||||
|
}
|
||||||
return Ref<Resource>();
|
return Ref<Resource>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue