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