From 7fc28a37a8c17b62d4692c478fa2f95ecb874ad3 Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Mon, 16 May 2016 21:40:17 +0100 Subject: [PATCH] Show alternative message if no SSL result could be found instead of crashing XAB. --- source/frmMain.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/source/frmMain.cpp b/source/frmMain.cpp index aff4528..6625432 100644 --- a/source/frmMain.cpp +++ b/source/frmMain.cpp @@ -2806,6 +2806,16 @@ void frmMain::SetupSSLStatus( int AccountID ){ std::map::iterator SSLResultIter = AccountSSLResult.find(AccountID); + // Check if a result value has been set. + + if (SSLResultIter == AccountSSLResult.end()){ + + imgSSLStatus->SetBitmap(*imgSSLWarning); + SSLToolTip->SetTip(wxT("Unable to determine SSL information for the '") + prefaccounts.GetAccountName(AccountID) + wxT("' account.")); + return; + + } + if (SSLResultIter->second == 1){ imgSSLStatus->SetBitmap(*imgSSLWarning); -- 2.39.2