From: Steve Brokenshire Date: Wed, 10 Feb 2016 01:07:42 +0000 (+0000) Subject: Fixed potential crash with frmContactEditorRoles in Edit mode. X-Git-Tag: release-0.09~21 X-Git-Url: http://Server1/repobrowser/?a=commitdiff_plain;h=86fb080afee9d77a1bdb610dd5655b6cae2514dd;p=xestiaab%2F.git Fixed potential crash with frmContactEditorRoles 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/frmContactEditorRoles.cpp b/source/contacteditor/frmContactEditorRoles.cpp index 3b30ff2..81d21fc 100644 --- a/source/contacteditor/frmContactEditorRoles.cpp +++ b/source/contacteditor/frmContactEditorRoles.cpp @@ -189,7 +189,8 @@ void frmContactEditorRoles::SetEditorMode(bool EditMode, SectionType SectType) intiter = RolesListPrefPtr->find(RolesListIndex); - if (intiter->first == RolesListIndex && intiter->second > 0){ + if (intiter->first == RolesListIndex && intiter->second > 0 && + intiter != RolesListPrefPtr->end()){ sliPriority->SetValue(intiter->second); sliPriority->Enable();