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

source/contacteditor/frmContactEditorEmail.cpp

index 2830a65..407b63b 100644 (file)
@@ -188,13 +188,14 @@ void frmContactEditorEmail::SetEditorMode(bool EditMode, SectionType SectType)
                
                intiter = EmailListPrefPtr->find(EmailListIndex);
                
-               if (intiter->first == EmailListIndex && intiter->second > 0){
+               if (intiter->first == EmailListIndex && intiter->second > 0 &&
+                       intiter != EmailListPrefPtr->end()){
                
                        sliPriority->SetValue(intiter->second);
                        sliPriority->Enable();
                        chkUsePref->SetValue(TRUE);
                
-               }       
+               }
                
        }
        
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