From 67b319b7fc27254c8a7ee8f72f5fc7b10b0c4552 Mon Sep 17 00:00:00 2001 From: Akseli Lahtinen Date: Wed, 27 Nov 2024 12:28:13 +0200 Subject: [PATCH] DolphinViewContainer: setSearchPath value only if searchBox is active Fixes a crash when searchbox is not active and tab gets renamed. I forgot to add this to merge request https://invent.kde.org/system/dolphin/-/merge_requests/864 CCBUG:496387 --- src/dolphinviewcontainer.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/dolphinviewcontainer.cpp b/src/dolphinviewcontainer.cpp index 33f261bf4..f2df638f6 100644 --- a/src/dolphinviewcontainer.cpp +++ b/src/dolphinviewcontainer.cpp @@ -896,7 +896,9 @@ void DolphinViewContainer::redirect(const QUrl &oldUrl, const QUrl &newUrl) // URL history. m_urlNavigator->saveLocationState(QByteArray()); m_urlNavigator->setLocationUrl(newUrl); - m_searchBox->setSearchPath(newUrl); + if (m_searchBox->isActive()) { + m_searchBox->setSearchPath(newUrl); + } setSearchModeEnabled(isSearchUrl(newUrl)); m_urlNavigator->blockSignals(block); -- 2.47.3