Avoid scaling for null pixmaps (results in warnings)

This commit is contained in:
Klaus Basan
2016-05-29 12:22:32 +02:00
parent bc926e592e
commit 771c531125
2 changed files with 12 additions and 4 deletions

View File

@@ -211,7 +211,7 @@ namespace BlackGui
else
{
QPixmap qpm = pm.pixmap();
if (qpm.height() > MaxHeight)
if (qpm.height() > MaxHeight && !qpm.isNull())
{
qpm = qpm.scaledToWidth(MaxHeight, Qt::SmoothTransformation);
}