since the target is destroyed, reset our internal pointer so we don't subsequently access it in setTargetItem and die a horrible death. corrects crashes in SAL.

svn path=/trunk/KDE/kdelibs/; revision=1026212
This commit is contained in:
Aaron J. Seigo 2009-09-21 05:26:12 +00:00
parent 03dbe67aae
commit 7b5f1d4e35

View File

@ -159,6 +159,7 @@ void ItemBackground::setTargetItem(QGraphicsItem *target)
connect(obj, SIGNAL(destroyed(QObject*)), this, SLOT(targetDestroyed(QObject*))); connect(obj, SIGNAL(destroyed(QObject*)), this, SLOT(targetDestroyed(QObject*)));
} }
} }
d->target = target; d->target = target;
} else { } else {
d->target = 0; d->target = 0;
@ -252,6 +253,7 @@ void ItemBackgroundPrivate::animationUpdate(qreal progress)
void ItemBackgroundPrivate::targetDestroyed(QObject*) void ItemBackgroundPrivate::targetDestroyed(QObject*)
{ {
target = 0;
q->setTargetItem(0); q->setTargetItem(0);
} }