summaryrefslogtreecommitdiff
path: root/libre/kdelibs-libre/fix-xfreepixmap-call.patch
blob: 5f535463365c9b80fd3b2d05cd6c8ee3fc0c6148 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
commit 9323adac35d40da69e3cb18504340e984c4afd05
Author: Anne-Marie Mahfouf <annma@kde.org>
Date:   Fri May 10 17:12:33 2013 +0200

    Fix crash when quitting apps
    
    Backport to 4.10 branch
    
    CCBUG: 319137

diff --git a/plasma/private/dialogshadows.cpp b/plasma/private/dialogshadows.cpp
index b54fb1a..1925670 100644
--- a/plasma/private/dialogshadows.cpp
+++ b/plasma/private/dialogshadows.cpp
@@ -336,6 +336,9 @@ void DialogShadows::Private::freeX11Pixmaps()
 {
 #ifdef Q_WS_X11
     foreach (const QPixmap &pixmap, m_shadowPixmaps) {
+        if (!QX11Info::display()) {
+            return;
+        }
         if (!pixmap.isNull()) {
             XFreePixmap(QX11Info::display(), pixmap.handle());
         }