┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDāvis Mosāns <[email protected]>2022-06-12 02:55:12 +0100
committerDāvis Mosāns <[email protected]>2022-06-15 02:35:19 +0100
commitfc2d181291fbbb76e4f62fdb1b9bb51a9f4d05dc (patch)
treecfdea9c8b2f30444bc592606c0c36c1522b8e22f
parent957e6309b8b60244a481a09d91d3a61f9ee9ceac (diff)
Fix rare ToolTipManager crash on exit
If tooltips are enabled and you hover over item while immediately closing Dolphin sometimes it would crash because native parent might have been destroyed before DolphinView
-rw-r--r--src/views/dolphinview.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp
index 25433406b..4f5b0e83a 100644
--- a/src/views/dolphinview.cpp
+++ b/src/views/dolphinview.cpp
@@ -1225,7 +1225,10 @@ void DolphinView::slotItemHovered(int index)
itemRect.moveTo(pos);
#ifdef HAVE_BALOO
- m_toolTipManager->showToolTip(item, itemRect, nativeParentWidget()->windowHandle());
+ auto nativeParent = nativeParentWidget();
+ if (nativeParent) {
+ m_toolTipManager->showToolTip(item, itemRect, nativeParent->windowHandle());
+ }
#endif
}