Check if the movie's current pixmap is null before drawing it

Change-Id: I87ed9998108961775f8f424bfbb4b957c0b03d8a
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
bb10
Andy Shaw 2018-04-03 14:28:37 +02:00
parent 559964849a
commit 33e5b55b7e
1 changed files with 1 additions and 1 deletions

View File

@ -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