check for toolbox existence, fixes a crash in plasmoidviewer

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=798068
This commit is contained in:
Marco Martin 2008-04-17 11:36:20 +00:00
parent 419277a044
commit ea9347e48f

View File

@ -263,7 +263,7 @@ void Containment::containmentConstraintsUpdated(Plasma::Constraints constraints)
d->toolbox->enableTool("addwidgets", !isImmutable());
}
if (constraints & Plasma::FormFactorConstraint) {
if (constraints & Plasma::FormFactorConstraint && d->toolbox) {
if (formFactor() == Vertical) {
d->toolbox->setOrientation(Qt::Vertical);
//defaults to horizontal