diff options
Diffstat (limited to 'xmlsecurity/workben/pdfverify.cxx')
-rw-r--r-- | xmlsecurity/workben/pdfverify.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/xmlsecurity/workben/pdfverify.cxx b/xmlsecurity/workben/pdfverify.cxx index 3076d1c47a43..b5052502573f 100644 --- a/xmlsecurity/workben/pdfverify.cxx +++ b/xmlsecurity/workben/pdfverify.cxx @@ -23,6 +23,7 @@ #include <vcl/svapp.hxx> #include <vcl/graphicfilter.hxx> #include <vcl/filter/pdfdocument.hxx> +#include <comphelper/scopeguard.hxx> #include <pdfio/pdfdocument.hxx> @@ -80,11 +81,11 @@ int pdfVerify(int nArgc, char** pArgv) uno::UNO_QUERY); comphelper::setProcessServiceFactory(xMultiServiceFactory); + InitVCL(); + comphelper::ScopeGuard g([] { DeInitVCL(); }); if (nArgc > 3 && OString(pArgv[3]) == "-p") { - InitVCL(); generatePreview(pArgv[1], pArgv[2]); - DeInitVCL(); return 0; } |