Make sure the source applet still exists

backported from trunk

svn path=/branches/KDE/4.2/kdelibs/; revision=919946
This commit is contained in:
Sebastian Kügler 2009-02-01 21:58:14 +00:00
parent 5171e27826
commit 2bbae9fb2d

View File

@ -449,10 +449,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,