summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@yahoo.com>2018-05-30 20:49:22 +0200
committerMatteo Casalin <matteo.casalin@yahoo.com>2018-06-16 16:19:33 +0200
commit133a56d75d77275fd9a0dcc08e759be14adc523f (patch)
treee81baea531be4a9fcb8edebfe1bbae3878361728 /vcl
parent2d0ac1a3581088f7f779c7ad6b0f9f80026ee44b (diff)
Improve 1a2ee0ecd5b0cff52922c1d261f7d03a57a52ca0
Change-Id: I50f369f28c3b97ba7fed494cb238b7756920abc6 (cherry picked from commit 91b5e86d5ef1318bd894b1fc3b537fb4615673da) Reviewed-on: https://gerrit.libreoffice.org/55890 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/filter/graphicfilter.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx
index 6e37dd6d3ff1..870c5586ea82 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 )