From: Dāvis Mosāns Date: Sun, 12 Jun 2022 01:55:12 +0000 (+0100) Subject: Fix rare ToolTipManager crash on exit X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/fc2d181291fbbb76e4f62fdb1b9bb51a9f4d05dc?ds=sidebyside 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 --- 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 }