From: Olivier Goffart Date: Mon, 23 Mar 2015 17:28:51 +0000 (+0100) Subject: SSLButton: Fix a crash X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~1890^2~25 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=9c05150c121a06e58e172facf509fd188c35d59d;p=nextcloud-desktop.git SSLButton: Fix a crash Made with danimo. Attempt to fix a crash seen on breakpad reports. (cc06b990-0c10-40eb-bcec-4d3902150320) --- 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 chain = account->sslConfiguration().peerCertificateChain(); + + if (chain.isEmpty()) { + qWarning() << "empty certificate chain"; + return; + } + menu->addAction(tr("Certificate information:"))->setEnabled(false); QList tmpChain;