Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
frmContactEditor: Stop XAB crashing when pressing Modify/Delete
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Tue, 5 Sep 2017 20:29:57 +0000 (21:29 +0100)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Tue, 5 Sep 2017 20:29:57 +0000 (21:29 +0100)
XAB crashes after adding an item, deselecting it from the list and then
clicking on either of the Modify or Delete buttons.

source/contacteditor/frmContactEditor.cpp

index 444b748..4856537 100644 (file)
@@ -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<int, std::string>* MapData){
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