summaryrefslogtreecommitdiff
path: root/package/source/zipapi/Deflater.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'package/source/zipapi/Deflater.cxx')
-rw-r--r--package/source/zipapi/Deflater.cxx13
1 files changed, 8 insertions, 5 deletions
diff --git a/package/source/zipapi/Deflater.cxx b/package/source/zipapi/Deflater.cxx
index 71b77fa88ae4..3dcec91fa237 100644
--- a/package/source/zipapi/Deflater.cxx
+++ b/package/source/zipapi/Deflater.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: Deflater.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: mtg $ $Date: 2000-11-21 17:57:07 $
+ * last change: $Author: mtg $ $Date: 2000-12-13 17:00:43 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -74,8 +74,7 @@ using namespace com::sun::star;
Deflater::~Deflater(void)
{
- if (pStream)
- delete pStream;
+ end();
}
void Deflater::init (sal_Int32 nLevel, sal_Int32 nStrategy, sal_Bool bNowrap)
{
@@ -312,6 +311,10 @@ void SAL_CALL Deflater::reset( )
void SAL_CALL Deflater::end( )
throw(uno::RuntimeException)
{
- z_deflateEnd(pStream);
+ if (pStream != NULL)
+ {
+ z_deflateEnd(pStream);
+ delete pStream;
+ }
pStream = NULL;
}