Do CloseEntry internally when OpenEntry called on an already open stream.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36269 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Michael Wetherell 2005-11-27 17:55:00 +00:00
parent bebf40d5a0
commit f489770c10

View File

@ -1561,7 +1561,8 @@ bool wxZipInputStream::DoOpen(wxZipEntry *entry, bool raw)
return false;
if (m_lasterror == wxSTREAM_READ_ERROR)
return false;
wxCHECK(!IsOpened(), false);
if (IsOpened())
CloseEntry();
m_raw = raw;
@ -1796,7 +1797,6 @@ wxFileOffset wxZipInputStream::OnSysSeek(wxFileOffset seek, wxSeekMode mode)
else
{
wxZipEntry current(m_entry);
CloseEntry();
if (!OpenEntry(current))
{
m_lasterror = wxSTREAM_READ_ERROR;