summaryrefslogtreecommitdiffstats
path: root/kde/kdelibs/kdelibs-4.6.0-fix-crash-in-plasma.patch
blob: 5fd8d0a5c3136851beb7ae8c916680e1f4dae056 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
commit 709f75ac353cd735ccac31f87363ea90dde345d3
Author: Marco Martin <notmart@gmail.com>
Date:   Tue Feb 1 21:15:49 2011 +0100

    don't collapse when it's destroying
    try to not crash upon deletion of the extender

diff --git a/plasma/extenders/extenderitem.cpp b/plasma/extenders/extenderitem.cpp
index bdbc886..3e5809f 100644
--- a/plasma/extenders/extenderitem.cpp
+++ b/plasma/extenders/extenderitem.cpp
@@ -596,6 +596,10 @@ void ExtenderItem::destroy()
 
 void ExtenderItem::setCollapsed(bool collapsed)
 {
+    if (extender()->d->destroying) {
+        return;
+    }
+
     config().writeEntry("isCollapsed", collapsed);
     d->collapsed = collapsed;
     d->collapseIcon->setToolTip(collapsed ? i18n("Expand this widget") : i18n("Collapse this widget"));