summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vcl/source/graphic/UnoGraphicProvider.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/vcl/source/graphic/UnoGraphicProvider.cxx b/vcl/source/graphic/UnoGraphicProvider.cxx
index ef0fd14c0149..09e911c7bc3a 100644
--- a/vcl/source/graphic/UnoGraphicProvider.cxx
+++ b/vcl/source/graphic/UnoGraphicProvider.cxx
@@ -297,7 +297,6 @@ uno::Reference< ::graphic::XGraphic > SAL_CALL GraphicProvider::queryGraphic( co
{
uno::Reference< ::graphic::XGraphic > xRet;
OUString aPath;
- std::unique_ptr<SvStream> pIStm;
uno::Reference< io::XInputStream > xIStm;
uno::Reference< awt::XBitmap >xBtm;
@@ -307,7 +306,7 @@ uno::Reference< ::graphic::XGraphic > SAL_CALL GraphicProvider::queryGraphic( co
bool bLazyRead = false;
bool bLoadAsLink = false;
- for( sal_Int32 i = 0; ( i < rMediaProperties.getLength() ) && !pIStm && !xRet.is(); ++i )
+ for (sal_Int32 i = 0; ( i < rMediaProperties.getLength() ) && !xRet.is(); ++i)
{
const OUString aName( rMediaProperties[ i ].Name );
const uno::Any aValue( rMediaProperties[ i ].Value );
@@ -365,6 +364,8 @@ uno::Reference< ::graphic::XGraphic > SAL_CALL GraphicProvider::queryGraphic( co
SolarMutexGuard g;
+ std::unique_ptr<SvStream> pIStm;
+
if( xIStm.is() )
{
pIStm = ::utl::UcbStreamHelper::CreateStream( xIStm );