summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2005-09-05 08:01:06 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2005-09-05 08:01:06 +0000
commit97ae05e05666716eed1d8d5090923ab486bc60f7 (patch)
tree886753c7c464b7a583b804939a976dac05df78da /vcl
parentd73471d133351dfee6a611fe1c9ef2df6e0aafe9 (diff)
INTEGRATION: CWS hr18 (1.4.396); FILE MERGED
2005/08/10 12:23:03 hr 1.4.396.1: #i53159#: fix PNGWriterImpl::Write(): unconditional element access on possibly empty STL container
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/gdi/pngwrite.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/vcl/source/gdi/pngwrite.cxx b/vcl/source/gdi/pngwrite.cxx
index 765d9b2e546e..b88f2590fc70 100644
--- a/vcl/source/gdi/pngwrite.cxx
+++ b/vcl/source/gdi/pngwrite.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: pngwrite.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: kz $ $Date: 2004-06-28 16:23:56 $
+ * last change: $Author: rt $ $Date: 2005-09-05 09:01:06 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -311,7 +311,8 @@ sal_Bool PNGWriterImpl::Write( SvStream& rOStm )
nCRC = rtl_crc32( nCRC, &aBeg->aData[ 0 ], nDataSize );
rOStm << nDataSize
<< aBeg->nType;
- rOStm.Write( &aBeg->aData[ 0 ], nDataSize );
+ if ( nDataSize )
+ rOStm.Write( &aBeg->aData[ 0 ], nDataSize );
rOStm << nCRC;
aBeg++;
}