]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Don't crash when opening a tab with enabled split view
authorPeter Penz <peter.penz19@gmail.com>
Fri, 27 Jan 2012 20:30:27 +0000 (21:30 +0100)
committerPeter Penz <peter.penz19@gmail.com>
Fri, 27 Jan 2012 21:01:04 +0000 (22:01 +0100)
BUG: 292470
FIXED-IN: 4.8.1

src/dolphinmainwindow.cpp

index 4502e703f8c960e546883c453a25348c468f93c4..60fded6312815557dff35239c2084c595b81ae12 100644 (file)
@@ -510,12 +510,12 @@ void DolphinMainWindow::openNewTab(const KUrl& url)
 
     actionCollection()->action("close_tab")->setEnabled(true);
 
 
     actionCollection()->action("close_tab")->setEnabled(true);
 
-    // provide a split view, if the startup settings are set this way
+    // Provide a split view, if the startup settings are set this way
     if (GeneralSettings::splitView()) {
         const int newTabIndex = m_viewTab.count() - 1;
         createSecondaryView(newTabIndex);
     if (GeneralSettings::splitView()) {
         const int newTabIndex = m_viewTab.count() - 1;
         createSecondaryView(newTabIndex);
-        viewTab.secondaryView->setActive(true);
-        viewTab.isPrimaryViewActive = false;
+        m_viewTab[newTabIndex].secondaryView->setActive(true);
+        m_viewTab[newTabIndex].isPrimaryViewActive = false;
     }
 
     if (focusWidget) {
     }
 
     if (focusWidget) {