and don't access the view unless we actually have one

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=781390
This commit is contained in:
Aaron J. Seigo 2008-03-02 19:32:37 +00:00
parent 7de5776f8e
commit 3c4a946af7

View File

@ -909,7 +909,11 @@ void Applet::paintWidget(QPainter *painter, const QStyleOptionGraphicsItem *opti
View* v = qobject_cast<Plasma::View*>(widget->parent());
if (!v || v->drawWallpaper()) {
Containment::StyleOption coption(*option);
coption.desktop = v->effectiveDesktop();
if (v) {
coption.desktop = v->effectiveDesktop();
}
paintInterface(painter, &coption, QRect(QPoint(0,0), d->contentSize(this).toSize()));
}