From b642c1677d8875a30fead84262513131658a488c Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Wed, 10 Feb 2016 01:51:31 +0000 Subject: [PATCH] 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. --- source/contacteditor/frmContactEditorWebsites.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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(); -- 2.39.2