summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/tabhighlighteffect.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/tabhighlighteffect.cpp b/src/tabhighlighteffect.cpp
index 14cdb6b6..b2d1e0df 100644
--- a/src/tabhighlighteffect.cpp
+++ b/src/tabhighlighteffect.cpp
@@ -47,7 +47,12 @@ TabHighlightEffect::TabHighlightEffect(TabBar *tabBar)
void TabHighlightEffect::draw(QPainter *painter)
{
- painter->drawPixmap(QPoint(0, 0), sourcePixmap());
+ const QPixmap &pixmap = sourcePixmap();
+
+ if (pixmap.isNull())
+ return;
+
+ painter->drawPixmap(QPoint(0, 0), pixmap);
Q_FOREACH(const QByteArray &propertyName, dynamicPropertyNames())
{