From: Steve Brokenshire Date: Tue, 5 Sep 2017 20:29:57 +0000 (+0100) Subject: frmContactEditor: Stop XAB crashing when pressing Modify/Delete X-Git-Tag: release-0.20~9 X-Git-Url: http://Server1/repobrowser/?a=commitdiff_plain;h=074e2db3331d35762f1d2dcf06d98f15200fc225;p=xestiaab%2F.git frmContactEditor: Stop XAB crashing when pressing Modify/Delete XAB crashes after adding an item, deselecting it from the list and then clicking on either of the Modify or Delete buttons. --- diff --git a/source/contacteditor/frmContactEditor.cpp b/source/contacteditor/frmContactEditor.cpp index 444b748..4856537 100644 --- a/source/contacteditor/frmContactEditor.cpp +++ b/source/contacteditor/frmContactEditor.cpp @@ -223,14 +223,14 @@ bool frmContactEditor::GetSelectedItem(wxListCtrl *ListCtrlPtr, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED); - *intSelectedData = (int)ListCtrlPtr->GetItemData(*longSelected); - if (*longSelected == -1){ return FALSE; - } else { - return TRUE; } + *intSelectedData = (int)ListCtrlPtr->GetItemData(*longSelected); + + return TRUE; + } void frmContactEditor::DeleteMapDataProcess(int IndexNum, std::map* MapData){