aboutsummaryrefslogtreecommitdiff
path: root/core/io/file_access_zip.cpp
diff options
context:
space:
mode:
authorAndreas Haas2017-04-06 13:18:41 +0200
committerAndreas Haas2017-04-06 13:43:13 +0200
commita2734df7edb244e92006be47f4bfb9f96115b277 (patch)
tree2b28a85bc81c5428d7d4c80ba5818f59b4874425 /core/io/file_access_zip.cpp
parent46bc14e66fe90430f1d74cdab6cca6acb5b2a3f6 (diff)
downloadgodot-a2734df7edb244e92006be47f4bfb9f96115b277.tar.gz
godot-a2734df7edb244e92006be47f4bfb9f96115b277.tar.zst
godot-a2734df7edb244e92006be47f4bfb9f96115b277.zip
Diffstat (limited to 'core/io/file_access_zip.cpp')
-rw-r--r--core/io/file_access_zip.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/core/io/file_access_zip.cpp b/core/io/file_access_zip.cpp
index 4cc2edd1c..47432b1e9 100644
--- a/core/io/file_access_zip.cpp
+++ b/core/io/file_access_zip.cpp
@@ -149,8 +149,7 @@ unzFile ZipArchive::get_file_handle(String p_file) const {
unzFile pkg = unzOpen2(packages[file.package].filename.utf8().get_data(), &io);
ERR_FAIL_COND_V(!pkg, NULL);
int unz_err = unzGoToFilePos(pkg, &file.file_pos);
- ERR_FAIL_COND_V(unz_err != UNZ_OK, NULL);
- if (unzOpenCurrentFile(pkg) != UNZ_OK) {
+ if (unz_err != UNZ_OK || unzOpenCurrentFile(pkg) != UNZ_OK) {
unzClose(pkg);
ERR_FAIL_V(NULL);