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 2754ea2f58c1..bc2978bb7c84 100644 --- a/xmlsecurity/workben/pdfverify.cxx +++ b/xmlsecurity/workben/pdfverify.cxx @@ -22,6 +22,7 @@ #include <vcl/svapp.hxx> #include <vcl/graphicfilter.hxx> #include <vcl/filter/pdfdocument.hxx> +#include <comphelper/scopeguard.hxx> #include <pdfio/pdfdocument.hxx> @@ -79,11 +80,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; } |