summaryrefslogtreecommitdiff
path: root/framework/source/uiconfiguration/moduleimagemanager.cxx
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2007-01-23 06:31:37 +0000
committerOliver Bolte <obo@openoffice.org>2007-01-23 06:31:37 +0000
commitc2d09176112019571bb13189afbe9c48226fb0cd (patch)
treec1feb408d632456d8d00a2d2d15da27cac493dc1 /framework/source/uiconfiguration/moduleimagemanager.cxx
parentb4e70fe9d7b42b787300da0fad00dfcb530cbe62 (diff)
INTEGRATION: CWS fwk59 (1.17.34); FILE MERGED
2007/01/12 08:34:19 cd 1.17.34.1: #i73311# Destroy stream after png reader class is destroyed!
Diffstat (limited to 'framework/source/uiconfiguration/moduleimagemanager.cxx')
-rw-r--r--framework/source/uiconfiguration/moduleimagemanager.cxx14
1 files changed, 9 insertions, 5 deletions
diff --git a/framework/source/uiconfiguration/moduleimagemanager.cxx b/framework/source/uiconfiguration/moduleimagemanager.cxx
index 8f6cdda3e2..1ee1d06150 100644
--- a/framework/source/uiconfiguration/moduleimagemanager.cxx
+++ b/framework/source/uiconfiguration/moduleimagemanager.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: moduleimagemanager.cxx,v $
*
- * $Revision: 1.17 $
+ * $Revision: 1.18 $
*
- * last change: $Author: vg $ $Date: 2006-11-21 17:20:34 $
+ * last change: $Author: obo $ $Date: 2007-01-23 07:31:37 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -630,9 +630,13 @@ sal_Bool ModuleImageManager::implts_loadUserImages(
if ( xBitmapStream.is() )
{
- SvStream* pSvStream = utl::UcbStreamHelper::CreateStream( xBitmapStream );
- vcl::PNGReader aPngReader( *pSvStream );
- BitmapEx aUserBitmap = aPngReader.Read();
+ SvStream* pSvStream( 0 );
+ BitmapEx aUserBitmap;
+ {
+ pSvStream = utl::UcbStreamHelper::CreateStream( xBitmapStream );
+ vcl::PNGReader aPngReader( *pSvStream );
+ aUserBitmap = aPngReader.Read();
+ }
delete pSvStream;
// Delete old image list and create a new one from the read bitmap