You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-12-03 16:55:53 +00:00
Fix bug where optional argument is not validated before use
This commit is contained in:
@@ -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>();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user