summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mainview.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/mainview.cpp b/src/mainview.cpp
index 80753bbf..0956e3ff 100644
--- a/src/mainview.cpp
+++ b/src/mainview.cpp
@@ -383,8 +383,15 @@ void MainView::slotCloneTab(int index)
index = currentIndex();
if (index < 0 || index >= count())
return;
- WebView *tab = newWebView();
- tab->setUrl(webView(index)->url());
+
+ WebView *tab = newWebView();
+ KUrl url = webView(index)->url();
+
+ // workaround against bug in webkit:
+ // only set url if it is not empty
+ // otherwise the current working directory will be used
+ if (!url.isEmpty())
+ tab->setUrl(url);
updateTabBar();
}