Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
frmContactEditor: Stop XAB crashing when pressing Modify/Delete
[xestiaab/.git] / source / contacteditor / frmContactEditorXToken.cpp
index e323fa5..7d0d261 100644 (file)
@@ -30,6 +30,8 @@ frmContactEditorXTokenADT( parent )
 void frmContactEditorXToken::ProcessAction( wxCommandEvent& event )
 {
 
+       // Process action.
+       
        long ListCtrlIndex;
        
        if (EditorMode == FALSE){
@@ -118,7 +120,8 @@ void frmContactEditorXToken::SetEditorMode(bool EditMode)
                
                striter = XTokenListTokensPtr->find(XTokenListIndex);
                 
-               if (striter->first == XTokenListIndex){
+               if (striter->first == XTokenListIndex &&
+                       striter != XTokenListTokensPtr->end()){
                
                        strValue = striter->second;
                
@@ -132,7 +135,8 @@ void frmContactEditorXToken::SetEditorMode(bool EditMode)
 
                striter = XTokenListPtr->find(XTokenListIndex);
                 
-               if (striter->first == XTokenListIndex){
+               if (striter->first == XTokenListIndex &&
+                       striter != XTokenListPtr->end()){
                
                        strValue = striter->second;
                
@@ -152,6 +156,8 @@ void frmContactEditorXToken::SetupPointers( std::map<int, wxString> *XTokenList,
                        int XTokenIndex )
 {
 
+       // Setup the pointers.
+       
        XTokenListPtr = XTokenList;
        XTokenListTokensPtr = XTokenListTokens;
        XTokenListCtrlPtr = XTokenListCtrl;
@@ -161,5 +167,8 @@ void frmContactEditorXToken::SetupPointers( std::map<int, wxString> *XTokenList,
 
 void frmContactEditorXToken::CloseWindow( wxCommandEvent& event )
 {
+       
+       // Close the window.
+       
        this->Close();
 }
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