do not disconnect if there's nothing to disconnect

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=737447
This commit is contained in:
Andre Duffeck 2007-11-16 08:52:09 +00:00
parent 1c4dd4a05a
commit 7677e98e9f

View File

@ -98,7 +98,9 @@ int View::screen() const
void View::setContainment(Containment *containment)
{
disconnect(d->containment, SIGNAL(geometryChanged()), this, SLOT(updateSceneRect()));
if( d->containment ) {
disconnect(d->containment, SIGNAL(geometryChanged()), this, SLOT(updateSceneRect()));
}
d->containment = containment;
d->screen = containment->screen();
updateSceneRect();