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

source/contacteditor/frmContactEditorNotes.cpp

index 0dbfb78..e07687a 100644 (file)
@@ -220,7 +220,8 @@ void frmContactEditorNotes::SetEditorMode(bool EditMode, SectionType SectType)
                
                striter = NotesListLangPtr->find(NotesListIndex);
                
-               if (striter->first == NotesListIndex){
+               if (striter->first == NotesListIndex &&
+                       striter != NotesListLangPtr->end()){
                
                        strValue = striter->second;
                
@@ -232,7 +233,8 @@ void frmContactEditorNotes::SetEditorMode(bool EditMode, SectionType SectType)
                
                intiter = NotesListPrefPtr->find(NotesListIndex);
                
-               if (intiter->first == NotesListIndex && intiter->second > 0){
+               if (intiter->first == NotesListIndex && intiter->second > 0 &&
+                       intiter != NotesListPrefPtr->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