summaryrefslogtreecommitdiff
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index ad11e1af..7e42e6c1 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -1598,7 +1598,19 @@ void MainWindow::closeEvent(QCloseEvent *event)
void MainWindow::populateUserAgentMenu()
{
KMenu *uaMenu = static_cast<KMenu *>(QObject::sender());
- rApp->userAgentManager()->populateUAMenuForTabUrl(uaMenu, currentTab());
+ if (!uaMenu)
+ {
+ kDebug() << "oops... NO user agent menu";
+ return;
+ }
+ WebTab *w = currentTab();
+ if (!w)
+ {
+ kDebug() << "oh oh... NO current tab. What is it happening here???";
+ return;
+ }
+
+ rApp->userAgentManager()->populateUAMenuForTabUrl(uaMenu, w);
}