From: Steve Brokenshire Date: Wed, 10 Feb 2016 01:51:31 +0000 (+0000) Subject: Fixed potential crash with frmContactEditorWebsites in Edit mode. X-Git-Tag: release-0.09~16 X-Git-Url: http://Server1/repobrowser/?p=xestiaab%2F.git;a=commitdiff_plain;h=b642c1677d8875a30fead84262513131658a488c Fixed potential crash with frmContactEditorWebsites in Edit mode. This would be caused because no checks were made on the iterator to see if it was valid or not. --- diff --git a/source/contacteditor/frmContactEditorWebsites.cpp b/source/contacteditor/frmContactEditorWebsites.cpp index d752438..d46744a 100644 --- a/source/contacteditor/frmContactEditorWebsites.cpp +++ b/source/contacteditor/frmContactEditorWebsites.cpp @@ -189,7 +189,8 @@ void frmContactEditorWebsites::SetEditorMode(bool EditMode, SectionType SectType intiter = WebsiteListPrefPtr->find(WebsiteListIndex); - if (intiter->first == WebsiteListIndex && intiter->second > 0){ + if (intiter->first == WebsiteListIndex && intiter->second > 0 && + intiter != WebsiteListPrefPtr->end()){ sliPriority->SetValue(intiter->second); sliPriority->Enable();