Avoid scaling null pixmap to avoid warning message

This commit is contained in:
Guy Scharf 2020-08-19 17:10:34 -07:00
parent 9642a54d04
commit 2e8ee43267

View File

@ -678,8 +678,11 @@ bool Machine::Load(ProgressDialog *progress)
return false; return false;
} }
QPixmap image = getPixmap().scaled(64,64); QPixmap image = getPixmap();
progress->setPixmap(image); if (!image.isNull()) {
image = image.scaled(64,64);
progress->setPixmap(image);
}
progress->setMessage(QObject::tr("Loading %1 data for %2...").arg(info.brand).arg(profile->user->userName())); progress->setMessage(QObject::tr("Loading %1 data for %2...").arg(info.brand).arg(profile->user->userName()));
if (loader()) { if (loader()) {