Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
frmContactEditor: Stop crashing when pressing Modify/Delete buttons when there's...
[xestiaab/.git] / source / contacteditor / frmContactEditor-Sound.cpp
index 7d9fcde..369238c 100644 (file)
@@ -50,7 +50,7 @@ void frmContactEditor::ModifySound( wxCommandEvent& event )
        long longSelected = -1;
        int intSelectedData = 0;
     
-       if (!GetSelectedItem(lboSounds,
+       if (lboSounds->GetItemCount() == 0 || !GetSelectedItem(lboSounds,
                &longSelected,
                 &intSelectedData)){
                return;
@@ -83,7 +83,7 @@ void frmContactEditor::DeleteSound( wxCommandEvent& event )
        long longSelected = -1;
        int intSelectedData = 0;
     
-       if (!GetSelectedItem(lboSounds,
+       if (lboSounds->GetItemCount() == 0 || !GetSelectedItem(lboSounds,
                &longSelected,
                &intSelectedData)){
                return;
@@ -153,7 +153,7 @@ void frmContactEditor::PlaySound( wxCommandEvent& event )
         
        }
     
-       if (!GetSelectedItem(lboSounds,
+       if (lboSounds->GetItemCount() == 0 || !GetSelectedItem(lboSounds,
                &longSelected,
                &intSelectedData)){
                return;
@@ -201,7 +201,7 @@ void frmContactEditor::SaveSound( wxCommandEvent &event )
        long longSelected = -1;
        int intSelectedData = 0;
     
-       if (!GetSelectedItem(lboSounds,
+       if (lboSounds->GetItemCount() == 0 || !GetSelectedItem(lboSounds,
                          &longSelected,
                          &intSelectedData)){
                
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