protect access to toolBox pointer

CCBUG:179909

svn path=/branches/KDE/4.2/kdelibs/; revision=907207
This commit is contained in:
Aaron J. Seigo 2009-01-07 16:44:25 +00:00
parent e4e0337c1a
commit f353a0dadc

View File

@ -1597,12 +1597,14 @@ void ContainmentPrivate::containmentConstraintsEvent(Plasma::Constraints constra
a->updateConstraints(ImmutableConstraint); a->updateConstraints(ImmutableConstraint);
} }
if (toolBox) {
if (type == Containment::PanelContainment || type == Containment::CustomPanelContainment) { if (type == Containment::PanelContainment || type == Containment::CustomPanelContainment) {
toolBox->setVisible(unlocked); toolBox->setVisible(unlocked);
} else { } else {
toolBox->setIsMovable(unlocked); toolBox->setIsMovable(unlocked);
} }
} }
}
if (constraints & Plasma::FormFactorConstraint) { if (constraints & Plasma::FormFactorConstraint) {
if (toolBox) { if (toolBox) {