ensure the icon has an action before using it

BUG:224944

svn path=/branches/KDE/4.4/kdelibs/; revision=1088114
This commit is contained in:
Aaron J. Seigo 2010-02-10 08:18:44 +00:00
parent a4f2a6eb7f
commit 4670d21feb

View File

@ -566,7 +566,9 @@ void DesktopToolBox::adjustToolBackerGeometry()
(viewTransform().m11() == Plasma::scalingFactor(Plasma::DesktopZoom) || (viewTransform().m11() == Plasma::scalingFactor(Plasma::DesktopZoom) ||
icon->action() == d->containment->action("add sibling containment") || icon->action() == d->containment->action("add sibling containment") ||
icon->action() == d->containment->action("add widgets"))) { icon->action() == d->containment->action("add widgets"))) {
if (icon->action()) {
icon->setText(icon->action()->text()); icon->setText(icon->action()->text());
}
} else { } else {
icon->setText(QString()); icon->setText(QString());
} }