summaryrefslogtreecommitdiff
path: root/src/settings
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2013-04-28 16:38:43 +0200
committerAndrea Diamantini <adjam7@gmail.com>2013-04-28 16:38:43 +0200
commitf404ca9883cd2ee5c3bba8cbf4c38b990917446f (patch)
tree760b67a7ae5ed408b9d3fad1c9f1b52185ed1275 /src/settings
parentLet url detection work the same when suggestions are active or not (diff)
downloadrekonq-f404ca9883cd2ee5c3bba8cbf4c38b990917446f.tar.xz
Avoid a possible crash if rekonqWindow is not properly detected
Diffstat (limited to 'src/settings')
-rw-r--r--src/settings/generalwidget.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/settings/generalwidget.cpp b/src/settings/generalwidget.cpp
index 0f582d66..ed38f35b 100644
--- a/src/settings/generalwidget.cpp
+++ b/src/settings/generalwidget.cpp
@@ -87,11 +87,14 @@ void GeneralWidget::hasChanged()
void GeneralWidget::setHomeToCurrentPage()
{
+ if (!rApp->rekonqWindow())
+ return;
+
WebWindow *tab = rApp->rekonqWindow()->currentWebWindow();
- if (tab)
- {
- kcfg_homePage->setText(tab->url().url());
- }
+ if (!tab)
+ return;
+
+ kcfg_homePage->setText(tab->url().url());
}