Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Fixed potential crash with frmContactEditorKey in Edit mode.
[xestiaab/.git] / source / contacteditor / frmContactEditorKey.cpp
index bcac1f5..569b0c3 100644 (file)
@@ -37,12 +37,15 @@ frmContactEditorKeyADT( parent )
        cmbKeyMainType->Append(_("URL"));
        cmbKeyMainType->Append(_("Key"));
        
+       cmbType->Append("");
        cmbType->Append(_("Home"));
        cmbType->Append(_("Work"));
        
        cmbURL->Append(_("PGP Key"));
        
        cmbKeyType->Append(_("PGP Key"));
+       
+       cmbType->SetSelection(0);
 
 }
 
@@ -110,7 +113,8 @@ void frmContactEditorKey::SetEditorMode(bool EditMode)
                        
                        striter = KeyListDataTypePtr->find(KeyListIndex);
                        
-                       if (striter->first == KeyListIndex){
+                       if (striter->first == KeyListIndex &&
+                               striter != KeyListDataTypePtr->end()){
                        
                                strValue = striter->second;
                        
@@ -149,7 +153,8 @@ void frmContactEditorKey::SetEditorMode(bool EditMode)
                        
                        striter = KeyListDataTypePtr->find(KeyListIndex);
                        
-                       if (striter->first == KeyListIndex){
+                       if (striter->first == KeyListIndex &&
+                               striter != KeyListDataTypePtr->end()){
                        
                                strValue = striter->second;
                        
@@ -165,7 +170,8 @@ void frmContactEditorKey::SetEditorMode(bool EditMode)
                
                striter = KeyListTypePtr->find(KeyListIndex);   
                
-               if (striter->first == KeyListIndex){
+               if (striter->first == KeyListIndex &&
+                       striter != KeyListTypePtr->end()){
                
                        strValue = striter->second;
                
@@ -189,7 +195,8 @@ void frmContactEditorKey::SetEditorMode(bool EditMode)
                
                intiter = KeyListPrefPtr->find(KeyListIndex);
                
-               if (intiter->first == KeyListIndex && intiter->second > 0){
+               if (intiter->first == KeyListIndex && intiter->second > 0 &&
+                       intiter != KeyListPrefPtr->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