Make sure the source applet still exists

Will backport to the 4.2 branch

svn path=/trunk/KDE/kdelibs/; revision=919944
This commit is contained in:
Sebastian Kügler 2009-02-01 21:56:19 +00:00
parent 9bd8fe0219
commit 42d63443ab

View File

@ -450,10 +450,12 @@ void ExtenderItem::setCollapsed(bool collapsed)
void ExtenderItem::returnToSource()
{
if (!d->sourceApplet) {
if (!d || !d->sourceApplet) {
return;
}
setExtender(d->sourceApplet->d->extender);
if (d->sourceApplet->d) {
setExtender(d->sourceApplet->d->extender);
}
}
void ExtenderItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option,