Kaydet (Commit) 1b73ed91 authored tarafından Tor Lillqvist's avatar Tor Lillqvist

Avoid crash without GPG

Change-Id: I5489012544fdf736784608b274359ea99f9ffe45
üst 38139892
......@@ -308,15 +308,18 @@ void SvxGeneralTabPage::InitCryptography()
{
xSEInitializer = xml::crypto::GPGSEInitializer::create( comphelper::getProcessComponentContext() );
uno::Reference<xml::crypto::XXMLSecurityContext> xSC = xSEInitializer->createSecurityContext( OUString() );
uno::Reference<xml::crypto::XSecurityEnvironment> xSE = xSC->getSecurityEnvironment();
uno::Sequence<uno::Reference<security::XCertificate>> xCertificates = xSE->getPersonalCertificates();
if (xCertificates.hasElements())
if (xSC.is())
{
for (auto& xCert : xCertificates)
uno::Reference<xml::crypto::XSecurityEnvironment> xSE = xSC->getSecurityEnvironment();
uno::Sequence<uno::Reference<security::XCertificate>> xCertificates = xSE->getPersonalCertificates();
if (xCertificates.hasElements())
{
m_pSigningKeyLB->InsertEntry( xCert->getIssuerName());
m_pEncryptionKeyLB->InsertEntry( xCert->getIssuerName());
for (auto& xCert : xCertificates)
{
m_pSigningKeyLB->InsertEntry( xCert->getIssuerName());
m_pEncryptionKeyLB->InsertEntry( xCert->getIssuerName());
}
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment