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

source/contacteditor/frmContactEditorOrganisations.cpp

index b6c2e19..9aa5f50 100644 (file)
@@ -239,7 +239,8 @@ void frmContactEditorOrganisations::SetEditorMode(bool EditMode, SectionType Sec
                
                striter = OrganisationListSortAsPtr->find(OrganisationListIndex);
                 
-               if (striter->first == OrganisationListIndex){
+               if (striter->first == OrganisationListIndex && 
+                 striter != OrganisationListSortAsPtr->end()){
                
                        strValue = striter->second;
                
@@ -251,7 +252,8 @@ void frmContactEditorOrganisations::SetEditorMode(bool EditMode, SectionType Sec
                
                intiter = OrganisationListPrefPtr->find(OrganisationListIndex);         
                
-               if (intiter->first == OrganisationListIndex && intiter->second > 0){
+               if (intiter->first == OrganisationListIndex && intiter->second > 0 &&
+                 striter != OrganisationListPrefPtr->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