From: Akseli Lahtinen Date: Wed, 27 Nov 2024 10:28:13 +0000 (+0200) Subject: DolphinViewContainer: setSearchPath value only if searchBox is active X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/67b319b7fc27254c8a7ee8f72f5fc7b10b0c4552 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 --- 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);