Remove warning about a null pixmap.

Since I didn't add a pixmap to be the background of the new profile, yet,
things got wrong on mac and crashed. This should fix it.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Tomaz Canabrava 2014-01-17 10:18:03 -02:00 committed by Dirk Hohndel
parent 470de7ee07
commit e23841dd7f

View file

@ -360,7 +360,11 @@ void ProfileWidget2::resizeEvent(QResizeEvent* event)
void ProfileWidget2::fixBackgroundPos()
{
QPixmap p = QPixmap(":background").scaledToHeight(viewport()->height());
QPixmap toBeScaled(":background");
if (toBeScaled.isNull())
return;
QPixmap p = toBeScaled.scaledToHeight(viewport()->height());
int x = viewport()->width() / 2 - p.width() / 2;
DivePixmapItem *bg = background;
bg->setPixmap(p);