Commit 7a08e4d2 authored by Andrea Diamantini's avatar Andrea Diamantini
Browse files

This changes fixes a crash that can occur on fast closing a lot of tabs.

It anyway changes a bit the behavior in that situation, running to set as current
the first tab (That FOR SURE will NOT be deleted)
parent a5b6f501
......@@ -129,13 +129,19 @@ TabBar *MainView::tabBar() const
UrlBar *MainView::currentUrlBar() const
return webTab(currentIndex())->urlBar();
return currentWebTab()->urlBar();
WebTab *MainView::currentWebTab() const
return webTab(currentIndex());
int i = currentIndex();
WebTab *b = webTab(i);
return b;
kDebug() << "We failed to find the current tab!!! Let's go sure with the first one...";
return webTab(0);
......@@ -229,10 +235,10 @@ void MainView::currentChanged(int index)
WebTab *tab = this->webTab(index);
if (!tab)
// retrieve the old webview (that where we move from)
WebTab *oldTab = this->webTab(m_currentTabIndex);
// set current index
m_currentTabIndex = index;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment