Skip to content

Commit

Permalink
Check if the movie's current pixmap is null before drawing it
Browse files Browse the repository at this point in the history
Change-Id: I87ed9998108961775f8f424bfbb4b957c0b03d8a
Reviewed-by: Richard Moe Gustavsen <[email protected]>
  • Loading branch information
AndyShawQt committed Apr 4, 2018
1 parent 5599648 commit 33e5b55
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/widgets/widgets/qlabel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 33e5b55

Please sign in to comment.