diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2013-04-28 16:38:43 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2013-04-28 16:38:43 +0200 |
commit | f404ca9883cd2ee5c3bba8cbf4c38b990917446f (patch) | |
tree | 760b67a7ae5ed408b9d3fad1c9f1b52185ed1275 /src/settings | |
parent | Let url detection work the same when suggestions are active or not (diff) | |
download | rekonq-f404ca9883cd2ee5c3bba8cbf4c38b990917446f.tar.xz |
Avoid a possible crash if rekonqWindow is not properly detected
Diffstat (limited to 'src/settings')
-rw-r--r-- | src/settings/generalwidget.cpp | 11 |
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()); } |