Use deleteLater() to delete the selection toggle in KItemListWidget

This patch should make a crash with a backtrace as provided in the bug
report impossible. I'm not sure if this would really prevent the crash
- it looks like the actual cause of the problem could be in
QGraphicsView or anywhere else, but it's hard to tell because the bug
was reported just once and does not seem reproducible. But I'm pretty
sure that this change doesn't make anything worse.

BUG: 334785
REVIEW: 121087
This commit is contained in:
Frank Reininghaus 2014-11-09 18:08:29 +01:00
parent e28147bf38
commit 1938ad54d4

View file

@ -474,7 +474,7 @@ qreal KItemListWidget::hoverOpacity() const
void KItemListWidget::slotHoverAnimationFinished()
{
if (!m_hovered) {
delete m_selectionToggle;
m_selectionToggle->deleteLater();
m_selectionToggle = 0;
}
}