summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/webview.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/webview.cpp b/src/webview.cpp
index 1057a5ef..4cb146f6 100644
--- a/src/webview.cpp
+++ b/src/webview.cpp
@@ -97,7 +97,6 @@ bool WebPage::acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &r
if(m_keyboardModifiers & Qt::ControlModifier || m_pressedButtons == Qt::MidButton)
{
- kWarning() << "ControlModifiers clicked..";
webView = Application::instance()->newWebView();
webView->setFocus();
webView->load(request);
@@ -113,11 +112,14 @@ bool WebPage::acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &r
}
else
{
- kWarning() << "NO Main Frame, creating a new WebView..";
- webView = Application::instance()->newWebView();
- webView->setFocus();
- webView->load(request);
- return false;
+ // if frame doesn't exists (perhaps) we are pointing to a blank target..
+ if(!frame)
+ {
+ webView = Application::instance()->newWebView();
+ webView->setFocus();
+ webView->load(request);
+ return false;
+ }
}
break;