You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
[Core] Replace ERR_FAIL_COND with ERR_FAIL_NULL where applicable
This commit is contained in:
@@ -239,7 +239,7 @@ Error FileAccessZip::open_internal(const String &p_path, int p_mode_flags) {
|
||||
|
||||
ERR_FAIL_COND_V(p_mode_flags & FileAccess::WRITE, FAILED);
|
||||
ZipArchive *arch = ZipArchive::get_singleton();
|
||||
ERR_FAIL_COND_V(!arch, FAILED);
|
||||
ERR_FAIL_NULL_V(arch, FAILED);
|
||||
zfile = arch->get_file_handle(p_path);
|
||||
ERR_FAIL_COND_V(!zfile, FAILED);
|
||||
|
||||
@@ -255,7 +255,7 @@ void FileAccessZip::_close() {
|
||||
}
|
||||
|
||||
ZipArchive *arch = ZipArchive::get_singleton();
|
||||
ERR_FAIL_COND(!arch);
|
||||
ERR_FAIL_NULL(arch);
|
||||
arch->close_handle(zfile);
|
||||
zfile = nullptr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user