From 91b5e86d5ef1318bd894b1fc3b537fb4615673da Mon Sep 17 00:00:00 2001 From: Matteo Casalin Date: Wed, 30 May 2018 20:49:22 +0200 Subject: Improve 1a2ee0ecd5b0cff52922c1d261f7d03a57a52ca0 Change-Id: I50f369f28c3b97ba7fed494cb238b7756920abc6 --- vcl/source/filter/graphicfilter.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'vcl') diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx index 9f5d6caeb0eb..1ba3d1d776ec 100644 --- a/vcl/source/filter/graphicfilter.cxx +++ b/vcl/source/filter/graphicfilter.cxx @@ -2439,8 +2439,9 @@ ErrCode GraphicFilter::ExportGraphic( const Graphic& rGraphic, const OUString& r } else { - sal_Int32 nIdx{0}; - do { + sal_Int32 nIdx {aFilterPath.isEmpty() ? -1 : 0}; + while (nIdx>=0) + { #ifndef DISABLE_DYNLOADING OUString aPhysicalName( ImpCreateFullFilterPath( aFilterPath.getToken(0, ';', nIdx), aFilterName ) ); osl::Module aLibrary( aPhysicalName ); @@ -2471,7 +2472,7 @@ ErrCode GraphicFilter::ExportGraphic( const Graphic& rGraphic, const OUString& r } else nStatus = ERRCODE_GRFILTER_FILTERERROR; - } while (nIdx>=0); + } } } if( nStatus != ERRCODE_NONE ) -- cgit