This is caused because no checks were made on the iterator to see if it
was valid or not.
striter = OrganisationListSortAsPtr->find(OrganisationListIndex);
- if (striter->first == OrganisationListIndex){
+ if (striter->first == OrganisationListIndex &&
+ striter != OrganisationListSortAsPtr->end()){
strValue = striter->second;
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();