summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@qt.io>2018-04-03 14:28:37 +0200
committerAndy Shaw <andy.shaw@qt.io>2018-04-04 08:42:52 +0000
commit33e5b55b7e48b3a1f68ef66ddf49be05e6dda47f (patch)
treeef89d80f3e9f2867abd4d3248b057801459af0c7
parent559964849af0d2dfcb409169dcc9e40d01c6fae2 (diff)
Check if the movie's current pixmap is null before drawing it
Change-Id: I87ed9998108961775f8f424bfbb4b957c0b03d8a Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
-rw-r--r--src/widgets/widgets/qlabel.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/widgets/qlabel.cpp b/src/widgets/widgets/qlabel.cpp
index 046acfeea9..947da273dd 100644
--- a/src/widgets/widgets/qlabel.cpp
+++ b/src/widgets/widgets/qlabel.cpp
@@ -1008,7 +1008,7 @@ void QLabel::paintEvent(QPaintEvent *)
: layoutDirection(), QFlag(d->align));
#if QT_CONFIG(movie)
- if (d->movie) {
+ if (d->movie && !d->movie->currentPixmap().isNull()) {
if (d->scaledcontents)
style->drawItemPixmap(&painter, cr, align, d->movie->currentPixmap().scaled(cr.size()));
else