Zip: fixed a crash caused by an I/O error (e.g., full disk) while creating a Zip archive

This commit is contained in:
Guenter Obiltschnig
2014-04-18 12:57:44 +02:00
parent 4655cab954
commit 3c9bc10042

View File

@@ -1,7 +1,7 @@
// //
// ZipStream.cpp // ZipStream.cpp
// //
// $Id: //poco/1.4/Zip/src/ZipStream.cpp#3 $ // $Id: //poco/1.4/Zip/src/ZipStream.cpp#4 $
// //
// Library: Zip // Library: Zip
// Package: Zip // Package: Zip
@@ -163,6 +163,11 @@ ZipStreamBuf::ZipStreamBuf(std::ostream& ostr, ZipLocalFileHeader& fileEntry, bo
ZipStreamBuf::~ZipStreamBuf() ZipStreamBuf::~ZipStreamBuf()
{ {
// make sure destruction of streams happens in correct order
_ptrOBuf = 0;
_ptrOHelper = 0;
_ptrBuf = 0;
_ptrHelper = 0;
} }