X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;f=source%2Fcontacteditor%2FfrmContactEditorXToken.cpp;h=7d0d2613581ee8369085ffe1908b2980366576bc;hb=ee9b71949005734012f18251774807c38b989ae2;hp=e323fa57c25da88adda45e10da335848589213e8;hpb=da64d37d0a13895554e4ad945c46dd0af6d1c0e6;p=xestiaab%2F.git diff --git a/source/contacteditor/frmContactEditorXToken.cpp b/source/contacteditor/frmContactEditorXToken.cpp index e323fa5..7d0d261 100644 --- a/source/contacteditor/frmContactEditorXToken.cpp +++ b/source/contacteditor/frmContactEditorXToken.cpp @@ -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 *XTokenList, int XTokenIndex ) { + // Setup the pointers. + XTokenListPtr = XTokenList; XTokenListTokensPtr = XTokenListTokens; XTokenListCtrlPtr = XTokenListCtrl; @@ -161,5 +167,8 @@ void frmContactEditorXToken::SetupPointers( std::map *XTokenList, void frmContactEditorXToken::CloseWindow( wxCommandEvent& event ) { + + // Close the window. + this->Close(); }