X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/03647350fc7cd141953c72e0284e928847d30f44..db06cdc08cee40c72854d6a883cf017c2bcc670e:/src/common/fileback.cpp diff --git a/src/common/fileback.cpp b/src/common/fileback.cpp index 5544ee7b54..704b54e165 100644 --- a/src/common/fileback.cpp +++ b/src/common/fileback.cpp @@ -168,11 +168,9 @@ wxStreamError wxBackingFileImpl::ReadAt(wxFileOffset pos, m_filelen += count; if (count < m_buflen) { - delete m_stream; - m_stream = NULL; + wxDELETE(m_stream); if (count > 0) { - delete[] m_buf; - m_buf = NULL; + wxDELETEA(m_buf); m_buflen = 0; } m_parenterror = wxSTREAM_READ_ERROR; @@ -182,8 +180,7 @@ wxStreamError wxBackingFileImpl::ReadAt(wxFileOffset pos, m_buflen = 0; if (!m_stream) { - delete[] m_buf; - m_buf = NULL; + wxDELETEA(m_buf); } } @@ -197,8 +194,7 @@ wxStreamError wxBackingFileImpl::ReadAt(wxFileOffset pos, m_parenterror = m_stream->GetLastError(); if (m_parenterror == wxSTREAM_NO_ERROR) m_parenterror = wxSTREAM_EOF; - delete m_stream; - m_stream = NULL; + wxDELETE(m_stream); } }