X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8cbc39e803460d493c2783c4474123a3b1817c03..0256cfeb6db72fb570ff043a2cdd214128b3ea2d:/src/common/zstream.cpp diff --git a/src/common/zstream.cpp b/src/common/zstream.cpp index 2636efd14b..4c7a7bf0ec 100644 --- a/src/common/zstream.cpp +++ b/src/common/zstream.cpp @@ -126,8 +126,14 @@ wxZlibOutputStream::wxZlibOutputStream(wxOutputStream& stream, int level) m_deflate->zfree = (free_func)0; m_deflate->opaque = (voidpf)0; - if (level == -1) level = Z_DEFAULT_COMPRESSION; - wxASSERT_MSG(level >= 0 && level <= 9, wxT("wxZlibOutputStream compression level must be between 0 and 9!")); + if ( level == -1 ) + { + level = Z_DEFAULT_COMPRESSION; + } + else + { + wxASSERT_MSG(level >= 0 && level <= 9, wxT("wxZlibOutputStream compression level must be between 0 and 9!")); + } err = deflateInit(m_deflate, level); if (err != Z_OK) {