[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/KDE/4.0/kdebase/workspace/khotkeys/kcontrol
From:       Laurent Montel <montel () kde ! org>
Date:       2008-03-03 12:59:06
Message-ID: 1204549146.198293.29023.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 781669 by mlaurent:

Backport:
Fix crash when we delete condition


 M  +6 -2      condition_list_widget.cpp  


--- branches/KDE/4.0/kdebase/workspace/khotkeys/kcontrol/condition_list_widget.cpp #781668:781669
@@ -226,10 +226,14 @@
     }
 
 void Condition_list_widget::delete_pressed()
+{
+    if ( selected_item )
     {
-    conditions.remove( selected_item->condition()); // we own it
-    delete selected_item; // CHECKME snad vyvola signaly pro enable()
+        conditions.remove( selected_item->condition()); // we own it
+        delete selected_item; // CHECKME snad vyvola signaly pro enable()
+        selected_item = NULL;
     }
+}
 
 void Condition_list_widget::modify_pressed()
     {
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic