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

source/contacteditor/frmContactEditorCalAdr.cpp

index f690811..29da66e 100644 (file)
@@ -213,7 +213,8 @@ void frmContactEditorCalAdr::SetEditorMode(bool EditMode)
                
                striter = CalAdrListTypePtr->find(CalAdrListIndex);     
                
-               if (striter->first == CalAdrListIndex){
+               if (striter->first == CalAdrListIndex && 
+                       striter != CalAdrListTypePtr->end()){
                
                        strValue = striter->second;
                
@@ -237,7 +238,8 @@ void frmContactEditorCalAdr::SetEditorMode(bool EditMode)
                
                intiter = CalAdrListPrefPtr->find(CalAdrListIndex);
                
-               if (intiter->first == CalAdrListIndex && intiter->second > 0){
+               if (intiter->first == CalAdrListIndex && intiter->second > 0 &&
+                       intiter != CalAdrListPrefPtr->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