}
- strIMUser = IMListPtr->find(IMListIndex)->second;
- strIMType = IMListTypeInfoPtr->find(IMListIndex)->second;
+ if (IMListPtr->find(IMListIndex) != IMListPtr->end()){
+
+ strIMUser = IMListPtr->find(IMListIndex)->second;
+
+ }
+
+ if (IMListTypeInfoPtr->find(IMListIndex) != IMListTypeInfoPtr->end()){
+
+ strIMType = IMListTypeInfoPtr->find(IMListIndex)->second;
+
+ }
if (strIMType == wxT("aim")){
intiter = IMListPrefPtr->find(IMListIndex);
- if (intiter->first == IMListIndex && intiter->second > 0){
+ if (intiter->first == IMListIndex && intiter->second > 0 &&
+ intiter != IMListPrefPtr->end()){
sliPriority->SetValue(intiter->second);
sliPriority->Enable();