diff --git a/Zip/Zip.swift b/Zip/Zip.swift index c806b0d40c6a7e13f60b811aef5bb49b49cda644..deff9477dcb72ceb65ea0ccabe4471bd7084228e 100644 --- a/Zip/Zip.swift +++ b/Zip/Zip.swift @@ -192,7 +192,8 @@ public class Zip { } } - fclose(filePointer) + if let fp = filePointer { fclose(fp) } + crc_ret = unzCloseCurrentFile(zip) if crc_ret == UNZ_CRCERROR { throw ZipError.unzipFail