┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkseli Lahtinen <[email protected]>2025-02-28 17:43:20 +0000
committerAkseli Lahtinen <[email protected]>2025-02-28 17:43:20 +0000
commit16f413ccd786f4ab37a3ea931624a76d5434fe2c (patch)
tree7dd076d7fe2d074efbe5801e4ad928eda7c7c821
parent6868bc3cc0a78a0e8a4888c262e5391ef3881727 (diff)
Fix crash when opening new tab with search
When new tab is opened and it has a search started, it tries to set the location URL to a navigator that is not yet necessarily assigned in memory: This is because the new tab is not active. The locationUrl will be changed properly when tab is activated. BUG:500101
-rw-r--r--src/dolphinviewcontainer.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/dolphinviewcontainer.cpp b/src/dolphinviewcontainer.cpp
index 40df2bc7d..dcf159cda 100644
--- a/src/dolphinviewcontainer.cpp
+++ b/src/dolphinviewcontainer.cpp
@@ -942,7 +942,12 @@ void DolphinViewContainer::startSearching()
const QUrl url = m_searchBox->urlForSearching();
if (url.isValid() && !url.isEmpty()) {
m_view->setViewPropertiesContext(QStringLiteral("search"));
- m_urlNavigatorConnected->setLocationUrl(url);
+ // If we open a new tab that has a search assigned to it, we can't
+ // update the urlNavigator, since there is none connected to that tab.
+ // See BUG:500101
+ if (m_urlNavigatorConnected) {
+ m_urlNavigatorConnected->setLocationUrl(url);
+ }
}
}