diff options
author | Cedric Bellegarde <gnumdk@gmail.com> | 2011-03-02 10:20:40 +0100 |
---|---|---|
committer | Cedric Bellegarde <gnumdk@gmail.com> | 2011-03-02 10:20:40 +0100 |
commit | 5765a34a7042226aaf01c19459c162d35508a18a (patch) | |
tree | 5a90907eaeff01e2b4fa4ebdef3bb75a620e7e72 | |
parent | This changes fixes a crash that can occur on fast closing a lot of tabs. (diff) | |
download | rekonq-5765a34a7042226aaf01c19459c162d35508a18a.tar.xz |
Check for empty pixmap, this prevent us drawing an empty area.
BUG:267312
-rw-r--r-- | src/tabhighlighteffect.cpp | 7 |
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()) { |