mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 09:32:12 +01:00
Merge pull request #624 from ff2000/master
Don't crash on adblock menu when adblock is disabled.
This commit is contained in:
commit
363b1716f4
|
@ -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());
|
||||
|
|
Loading…
Reference in New Issue
Block a user