From 3159e29c4807453311bcc8f90207ca74fb130863 Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Wed, 10 Feb 2016 01:10:11 +0000 Subject: [PATCH] Fixed potential crash with frmContactEditorTelephone 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/frmContactEditorTelephone.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/contacteditor/frmContactEditorTelephone.cpp b/source/contacteditor/frmContactEditorTelephone.cpp index 55f2c68..974151c 100644 --- a/source/contacteditor/frmContactEditorTelephone.cpp +++ b/source/contacteditor/frmContactEditorTelephone.cpp @@ -522,7 +522,8 @@ void frmContactEditorTelephone::SetEditorMode(bool EditMode, SectionType SectTyp intiter = TelephoneListPrefPtr->find(TelephoneListIndex); - if (intiter->first == TelephoneListIndex && intiter->second > 0){ + if (intiter->first == TelephoneListIndex && intiter->second > 0 && + intiter != TelephoneListPrefPtr->end()){ sliPriority->SetValue(intiter->second); sliPriority->Enable(); -- 2.39.5