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

source/contacteditor/frmContactEditorRelated.cpp

index 31bbf7e..04cc162 100644 (file)
@@ -99,7 +99,8 @@ void frmContactEditorRelated::SetEditorMode(bool EditMode, SectionType SectType)
                
                striter = RelatedListRelTypePtr->find(RelatedListIndex);
                 
-               if (striter->first == RelatedListIndex){
+               if (striter->first == RelatedListIndex &&
+                       striter != RelatedListRelTypePtr->end()){
                
                        strValue = striter->second;
                
@@ -195,7 +196,8 @@ void frmContactEditorRelated::SetEditorMode(bool EditMode, SectionType SectType)
                
                intiter = RelatedListPrefPtr->find(RelatedListIndex);
                
-               if (intiter->first == RelatedListIndex && intiter->second > 0){
+               if (intiter->first == RelatedListIndex && intiter->second > 0 &&
+                       intiter != RelatedListPrefPtr->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