try to avoid managing eventfilter on delete objects
svn path=/trunk/KDE/kdelibs/; revision=1127690
This commit is contained in:
parent
f61acfa498
commit
bf5beef483
@ -66,6 +66,7 @@ FocusIndicator::FocusIndicator(QGraphicsWidget *parent, QString widget)
|
||||
|
||||
FocusIndicator::~FocusIndicator()
|
||||
{
|
||||
m_parent->removeEventFilter(this);
|
||||
delete m_fade;
|
||||
}
|
||||
|
||||
@ -82,7 +83,7 @@ void FocusIndicator::setCustomPrefix(const QString &prefix)
|
||||
|
||||
bool FocusIndicator::eventFilter(QObject *watched, QEvent *event)
|
||||
{
|
||||
if (static_cast<QGraphicsWidget *>(watched) != m_parent) {
|
||||
if (static_cast<QGraphicsWidget *>(watched) != m_parent || !m_parent) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user