summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-10-19 08:29:52 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-10-19 08:32:23 +0200
commit6947962b085734fd313cbc055f18e62da9e73c8b (patch)
tree232113a942229d646b9110142c6c3a5a96f08c2c
parent6f96e86dae6e8fd0861848bbb396278831afc01d (diff)
cid#1374074 uncaught exception
Change-Id: Ibb734d394b49a032fab1dc1255376d6b7bb3632d
-rw-r--r--xmlsecurity/source/pdfio/pdfverify.cxx11
1 files changed, 10 insertions, 1 deletions
diff --git a/xmlsecurity/source/pdfio/pdfverify.cxx b/xmlsecurity/source/pdfio/pdfverify.cxx
index 5df1fffc90cf..15108d18650d 100644
--- a/xmlsecurity/source/pdfio/pdfverify.cxx
+++ b/xmlsecurity/source/pdfio/pdfverify.cxx
@@ -31,7 +31,16 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(nArgc, pArgv)
}
// Initialize nss / mscrypto.
- uno::Reference<uno::XComponentContext> xComponentContext = cppu::defaultBootstrap_InitialComponentContext();
+ uno::Reference<uno::XComponentContext> xComponentContext;
+ try
+ {
+ xComponentContext = cppu::defaultBootstrap_InitialComponentContext();
+ }
+ catch (const uno::RuntimeException& rException)
+ {
+ SAL_WARN("xmlsecurity.pdfio", "cppu::defaultBootstrap_InitialComponentContext() failed: " << rException.Message);
+ return 1;
+ }
uno::Reference<lang::XMultiComponentFactory> xMultiComponentFactory = xComponentContext->getServiceManager();
uno::Reference<lang::XMultiServiceFactory> xMultiServiceFactory(xMultiComponentFactory, uno::UNO_QUERY);;
comphelper::setProcessServiceFactory(xMultiServiceFactory);