summaryrefslogtreecommitdiff
path: root/src/webtab.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2012-06-17 07:50:49 +0200
committerAndrea Diamantini <adjam7@gmail.com>2012-06-17 07:50:49 +0200
commit02d530fd8897b9d1aa9cc3b0ad8712a3b17d468f (patch)
tree87cb17c446cc37250387afd12bc478ce6d2d36d5 /src/webtab.cpp
parentSVN_SILENT made messages (.desktop file) (diff)
downloadrekonq-02d530fd8897b9d1aa9cc3b0ad8712a3b17d468f.tar.xz
Super safe checks in WebTab::url() detection
BUG: 299400
Diffstat (limited to 'src/webtab.cpp')
-rw-r--r--src/webtab.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/webtab.cpp b/src/webtab.cpp
index de7e134c..c049e459 100644
--- a/src/webtab.cpp
+++ b/src/webtab.cpp
@@ -121,7 +121,10 @@ WebView *WebTab::view()
WebPage *WebTab::page()
{
- return view()->page();
+ if (view())
+ return view()->page();
+
+ return 0;
}
@@ -132,7 +135,11 @@ KUrl WebTab::url()
return page()->loadingUrl();
}
- return view()->url();
+ if (view())
+ return view()->url();
+
+ kDebug() << "OOPS... NO web classes survived! Returning an empty url...";
+ return KUrl();
}