Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Fixed potential crash with frmContactEditorTitles in Edit mode.
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Wed, 10 Feb 2016 01:11:23 +0000 (01:11 +0000)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Wed, 10 Feb 2016 01:11:23 +0000 (01:11 +0000)
This would be caused because no checks were made on the iterator to see
if it was valid or not.

source/contacteditor/frmContactEditorTitles.cpp

index 497c28e..4de0d1a 100644 (file)
@@ -175,7 +175,8 @@ void frmContactEditorTitles::SetEditorMode(bool EditMode, SectionType SectType)
                
                striter = TitlesListPtr->find(TitlesListIndex);
                 
-               if (striter->first == TitlesListIndex){
+               if (striter->first == TitlesListIndex &&
+                       striter != TitlesListPtr->end()){
                
                        strValue = striter->second;
                
@@ -189,7 +190,8 @@ void frmContactEditorTitles::SetEditorMode(bool EditMode, SectionType SectType)
                
                intiter = TitlesListPrefPtr->find(TitlesListIndex);
                
-               if (intiter->first == TitlesListIndex && intiter->second > 0){
+               if (intiter->first == TitlesListIndex && intiter->second > 0 &&
+                       intiter != TitlesListPrefPtr->end()){
                
                        sliPriority->SetValue(intiter->second);
                        sliPriority->Enable();
Xestia Software Development
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software

Xestia Address Book
Xestia Calendar
Development

Xestia Gelforn
Everything else

About
News
Privacy Policy