From 37da53731c6c92b4ece0bdb6e264472adf2f6d9f Mon Sep 17 00:00:00 2001 From: Franz Fellner Date: Sat, 27 Oct 2012 13:36:48 +0200 Subject: [PATCH] Don't crash on adblock menu when adblock is disabled. --- src/lib/adblock/adblockicon.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/adblock/adblockicon.cpp b/src/lib/adblock/adblockicon.cpp index e1051a1a1..d91d5d288 100644 --- a/src/lib/adblock/adblockicon.cpp +++ b/src/lib/adblock/adblockicon.cpp @@ -111,7 +111,7 @@ void AdBlockIcon::createMenu(QMenu* menu) menu->addAction(tr("Show AdBlock &Settings"), manager, SLOT(showDialog())); menu->addSeparator(); - if (!pageUrl.isEmpty()) { + if (!pageUrl.isEmpty() && m_enabled) { const QString &host = page->url().host().contains(QLatin1String("www.")) ? pageUrl.host().mid(4) : pageUrl.host(); const QString &hostFilter = QString("@@||%1^$document").arg(host); const QString &pageFilter = QString("@@|%1|$document").arg(pageUrl.toString());