striter = AddressListPtr->find(AddressListIndex);
- if (striter->first == AddressListIndex){
+ if (striter->first == AddressListIndex &&
+ striter != AddressListPtr->end()){
txtAddress->SetValue(striter->second);
striter = AddressListTownPtr->find(AddressListIndex);
- if (striter->first == AddressListIndex){
+ if (striter->first == AddressListIndex &&
+ striter != AddressListTownPtr->end()){
txtTownCity->SetValue(striter->second);
striter = AddressListCountyPtr->find(AddressListIndex);
- if (striter->first == AddressListIndex){
+ if (striter->first == AddressListIndex &&
+ striter != AddressListCountyPtr->end()){
txtCounty->SetValue(striter->second);
striter = AddressListPostCodePtr->find(AddressListIndex);
- if (striter->first == AddressListIndex){
+ if (striter->first == AddressListIndex &&
+ striter != AddressListPostCodePtr->end()){
txtPostCode->SetValue(striter->second);
striter = AddressListCountryPtr->find(AddressListIndex);
- if (striter->first == AddressListIndex){
+ if (striter->first == AddressListIndex &&
+ striter != AddressListCountryPtr->end()){
txtCountry->SetValue(striter->second);
intiter = AddressListPrefPtr->find(AddressListIndex);
- if (intiter->first == AddressListIndex && intiter->second > 0 && intiter != AddressListPrefPtr->end()){
+ if (intiter->first == AddressListIndex && intiter->second > 0 && intiter != AddressListPrefPtr->end() &&
+ intiter != AddressListPrefPtr->end()){
sliPriority->SetValue(intiter->second);
sliPriority->Enable();
striter = AddressListLabelPtr->find(AddressListIndex);
- if (striter->first == AddressListIndex && striter != AddressListLabelPtr->end()){
+ if (striter->first == AddressListIndex && striter != AddressListLabelPtr->end() &&
+ striter != AddressListLabelPtr->end()){
strValue = striter->second;
if (strValue.Left(1) == "\"" && strValue.Right(1) == "\""){