X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;f=source%2Fcontacteditor%2FfrmContactEditor-Category.cpp;h=3fc61ae50ab8f58108be08fe538931227ceeedfb;hb=ada42724cf083b0a311cf22260485d61516c25c8;hp=3150377624f6c49675f0cd26529722daa7119e9b;hpb=9f0fa371686577f1c6eed05f75088ce988c19185;p=xestiaab%2F.git diff --git a/source/contacteditor/frmContactEditor-Category.cpp b/source/contacteditor/frmContactEditor-Category.cpp index 3150377..3fc61ae 100644 --- a/source/contacteditor/frmContactEditor-Category.cpp +++ b/source/contacteditor/frmContactEditor-Category.cpp @@ -48,7 +48,7 @@ void frmContactEditor::ModifyCategory( wxCommandEvent& event ) long longSelected = -1; int intSelectedData = 0; - if (!GetSelectedItem(lboCategories, + if (lboCategories->GetItemCount() == 0 || !GetSelectedItem(lboCategories, &longSelected, &intSelectedData)){ @@ -80,7 +80,7 @@ void frmContactEditor::DeleteCategory( wxCommandEvent& event ) long longSelected = -1; int intSelectedData = 0; - if (!GetSelectedItem(lboCategories, + if (lboCategories->GetItemCount() == 0 || !GetSelectedItem(lboCategories, &longSelected, &intSelectedData)){