summaryrefslogtreecommitdiff
path: root/xmlsecurity
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-07-04 15:19:35 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-07-04 15:19:35 +0200
commitd746a99558a3f9c8625988ed87264ff12b355859 (patch)
treecbb11e8e892b19e76f998eedb9d24869627919cf /xmlsecurity
parente9c3eccdb1ebf77d09dd7ad47b0708e1cb44417d (diff)
Certificate viewer dialog can have various kinds of parents
...like the "Security Warning: Domain Name Mismatch" WarnDialog (cf. TITLE_UUI_SSLWARN_DOMAINMISMATCH in uui), not only a CertificateChooser. Regression introduced with c42be58e4c006ab3e1f262b644789cba8659d0ab "Show the certificate use also in the View Certificate dialog", for which this fix is hopefully fine. Change-Id: I6efced1ebaad07c314fe7a5dd1cdc8e91d34555e
Diffstat (limited to 'xmlsecurity')
-rw-r--r--xmlsecurity/source/dialogs/certificateviewer.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/xmlsecurity/source/dialogs/certificateviewer.cxx b/xmlsecurity/source/dialogs/certificateviewer.cxx
index 3749160a5078..a256d3d3937f 100644
--- a/xmlsecurity/source/dialogs/certificateviewer.cxx
+++ b/xmlsecurity/source/dialogs/certificateviewer.cxx
@@ -280,9 +280,11 @@ CertificateViewerDetailsTP::CertificateViewerDetailsTP( vcl::Window* _pParent, C
InsertElement( XMLSEC_RES( STR_SIGNATURE_ALGO ), aLBEntry, aDetails );
CertificateChooser* pChooser = dynamic_cast<CertificateChooser*>(mpDlg->GetParent());
- assert(pChooser);
- aLBEntry = pChooser->UsageInClearText( mpDlg->mxCert->getCertificateUsage() );
- InsertElement( XMLSEC_RES( STR_USE ), aLBEntry, aLBEntry );
+ if (pChooser)
+ {
+ aLBEntry = pChooser->UsageInClearText( mpDlg->mxCert->getCertificateUsage() );
+ InsertElement( XMLSEC_RES( STR_USE ), aLBEntry, aLBEntry );
+ }
aSeq = xCert->getSHA1Thumbprint();
aLBEntry = XmlSec::GetHexString( aSeq, pHexSep );