controlpanelui/src/cpplugins/profileactivatorplugin/src/cpprofileactivatordialog.cpp
changeset 17 4a9568303383
parent 14 23411a3be0db
child 24 f5dfdd5e4a1b
--- a/controlpanelui/src/cpplugins/profileactivatorplugin/src/cpprofileactivatordialog.cpp	Thu May 27 12:52:25 2010 +0300
+++ b/controlpanelui/src/cpplugins/profileactivatorplugin/src/cpprofileactivatordialog.cpp	Fri Jun 11 13:39:17 2010 +0300
@@ -61,6 +61,9 @@
 void CpProfileActivatorDialog::confirmProfileSelection()
 {
     int currentIndex = mProfileList->selected();
+    if (currentIndex == -1) {
+        return;
+    }
     
     // the best choice is no need to convert the index to id
     mProfileModel.activateProfile(mProfileIds.at(currentIndex));