From: Steve Brokenshire Date: Wed, 10 Feb 2016 01:10:11 +0000 (+0000) Subject: Fixed potential crash with frmContactEditorTelephone in Edit mode. X-Git-Tag: release-0.09~19 X-Git-Url: http://Server1/repobrowser/?p=xestiaab%2F.git;a=commitdiff_plain;h=3159e29c4807453311bcc8f90207ca74fb130863 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. --- 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();