]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Fix rare ToolTipManager crash on exit
authorDāvis Mosāns <davispuh@gmail.com>
Sun, 12 Jun 2022 01:55:12 +0000 (02:55 +0100)
committerDāvis Mosāns <davispuh@gmail.com>
Wed, 15 Jun 2022 01:35:19 +0000 (02:35 +0100)
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

src/views/dolphinview.cpp

index 25433406bab2f1442117896faef6a07356223666..4f5b0e83a212b1daad337d444b4ac9d20a8dd31c 100644 (file)
@@ -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
     }