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:
parent
03dbe67aae
commit
7b5f1d4e35
@ -159,6 +159,7 @@ void ItemBackground::setTargetItem(QGraphicsItem *target)
|
||||
connect(obj, SIGNAL(destroyed(QObject*)), this, SLOT(targetDestroyed(QObject*)));
|
||||
}
|
||||
}
|
||||
|
||||
d->target = target;
|
||||
} else {
|
||||
d->target = 0;
|
||||
@ -252,6 +253,7 @@ void ItemBackgroundPrivate::animationUpdate(qreal progress)
|
||||
|
||||
void ItemBackgroundPrivate::targetDestroyed(QObject*)
|
||||
{
|
||||
target = 0;
|
||||
q->setTargetItem(0);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user