X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/abffc1ff5d6546356804b0c2c6805a655c28104b..6c5d62917d14278d8925a73d754965713e11e32f:/src/common/zstream.cpp?ds=sidebyside diff --git a/src/common/zstream.cpp b/src/common/zstream.cpp index 684ff82cfd..0b4878cf91 100644 --- a/src/common/zstream.cpp +++ b/src/common/zstream.cpp @@ -283,7 +283,11 @@ size_t wxZlibOutputStream::OnSysWrite(const void *buffer, size_t size) wxASSERT_MSG(m_deflate && m_z_buffer, wxT("Deflate stream not open")); if (!m_deflate || !m_z_buffer) + { + // notice that this will make IsOk() test just below return false m_lasterror = wxSTREAM_WRITE_ERROR; + } + if (!IsOk() || !size) return 0;