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

List:       kde-commits
Subject:    branches/KDE/4.4/kdelibs/plasma
From:       Fredrik Höglund <fredrik () kde ! org>
Date:       2010-01-27 16:32:47
Message-ID: 1264609967.689744.3361.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1081056 by fredrik:

Backport r1081054:

Don't crash in PaintUtils::transition() if the pixmap doesn't have a
paint engine.

This is sometimes the case when called from AbstractTaskItem::drawTask().


 M  +5 -3      paintutils.cpp  


--- branches/KDE/4.4/kdelibs/plasma/paintutils.cpp #1081055:1081056
@@ -178,8 +178,10 @@
 
 
     // If the native paint engine supports Porter/Duff compositing and CompositionMode_Plus
-    if (from.paintEngine()->hasFeature(QPaintEngine::PorterDuff) &&
-        from.paintEngine()->hasFeature(QPaintEngine::BlendModes)) {
+    QPaintEngine *paintEngine = from.paintEngine();
+    if (paintEngine &&
+        paintEngine->hasFeature(QPaintEngine::PorterDuff) &&
+        paintEngine->hasFeature(QPaintEngine::BlendModes)) {
         QPixmap under = from;
         QPixmap over  = to;
 
@@ -200,7 +202,7 @@
     }
 #if defined(Q_WS_X11) && defined(HAVE_XRENDER)
     // We have Xrender support
-    else if (from.paintEngine()->hasFeature(QPaintEngine::PorterDuff)) {
+    else if (paintEngine && paintEngine->hasFeature(QPaintEngine::PorterDuff)) {
         // QX11PaintEngine doesn't implement CompositionMode_Plus in Qt 4.3,
         // which we need to be able to do a transition from one pixmap to
         // another.
[prev in list] [next in list] [prev in thread] [next in thread] 

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