diff options
author | Olivier Goffart <ogoffart@woboq.com> | 2015-03-23 20:28:51 +0300 |
---|---|---|
committer | Olivier Goffart <ogoffart@woboq.com> | 2015-03-23 20:30:53 +0300 |
commit | 9c05150c121a06e58e172facf509fd188c35d59d (patch) | |
tree | 00857bb0ecef7743e4bd95d460f139ecab86aeb7 /src/gui/sslbutton.cpp | |
parent | c7eb85ef780bc935649675880e0fdc7d83af7020 (diff) |
SSLButton: Fix a crash
Made with danimo.
Attempt to fix a crash seen on breakpad reports.
(cc06b990-0c10-40eb-bcec-4d3902150320)
Diffstat (limited to 'src/gui/sslbutton.cpp')
-rw-r--r-- | src/gui/sslbutton.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gui/sslbutton.cpp b/src/gui/sslbutton.cpp index 226dc54ed..d7768b5c5 100644 --- a/src/gui/sslbutton.cpp +++ b/src/gui/sslbutton.cpp @@ -190,6 +190,12 @@ void SslButton::updateAccountState(AccountState *accountState) setToolTip(tr("This connection is encrypted using %1 bit %2.\n").arg(cipher.usedBits()).arg(cipher.name())); QMenu *menu = new QMenu(this); QList<QSslCertificate> chain = account->sslConfiguration().peerCertificateChain(); + + if (chain.isEmpty()) { + qWarning() << "empty certificate chain"; + return; + } + menu->addAction(tr("Certificate information:"))->setEnabled(false); QList<QSslCertificate> tmpChain; |