mirror of
https://invent.kde.org/system/dolphin
synced 2024-09-12 12:54:29 +00:00
Make sure that m_selectionToggle is not 0 before calling deleteLater()
Commit 1938ad54d4
replaced delete by
deleteLater(). However, the latter cannot be used safely with null
pointers. This commit adds a safety check in order to make sure that
we do not get a crash.
Thanks to Christoph Feck for pointing out this issue.
This commit is contained in:
parent
b73ed8eba9
commit
7e58ee0133
|
@ -473,7 +473,7 @@ qreal KItemListWidget::hoverOpacity() const
|
||||||
|
|
||||||
void KItemListWidget::slotHoverAnimationFinished()
|
void KItemListWidget::slotHoverAnimationFinished()
|
||||||
{
|
{
|
||||||
if (!m_hovered) {
|
if (!m_hovered && m_selectionToggle) {
|
||||||
m_selectionToggle->deleteLater();
|
m_selectionToggle->deleteLater();
|
||||||
m_selectionToggle = 0;
|
m_selectionToggle = 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue