summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCedric Bellegarde <gnumdk@gmail.com>2011-03-02 10:20:40 +0100
committerCedric Bellegarde <gnumdk@gmail.com>2011-03-02 10:20:40 +0100
commit5765a34a7042226aaf01c19459c162d35508a18a (patch)
tree5a90907eaeff01e2b4fa4ebdef3bb75a620e7e72 /src
parentThis changes fixes a crash that can occur on fast closing a lot of tabs. (diff)
downloadrekonq-5765a34a7042226aaf01c19459c162d35508a18a.tar.xz
Check for empty pixmap, this prevent us drawing an empty area.
BUG:267312
Diffstat (limited to 'src')
-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())
{