summaryrefslogtreecommitdiff
path: root/src/adblock/adblockmanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/adblock/adblockmanager.cpp')
-rw-r--r--src/adblock/adblockmanager.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/adblock/adblockmanager.cpp b/src/adblock/adblockmanager.cpp
index 4b603b8c..fe4d028a 100644
--- a/src/adblock/adblockmanager.cpp
+++ b/src/adblock/adblockmanager.cpp
@@ -208,6 +208,9 @@ void AdBlockManager::loadRuleString(const QString &stringRule)
return;
const QString filter = stringRule.mid(2);
+ if (filter.isEmpty())
+ return;
+
AdBlockRule rule(filter);
_whiteList << rule;
return;
@@ -216,7 +219,11 @@ void AdBlockManager::loadRuleString(const QString &stringRule)
// hide (CSS) rules
if (stringRule.startsWith(QL1S("##")))
{
- _hideList << stringRule.mid(2);
+ const QString filter = stringRule.mid(2);
+ if (filter.isEmpty())
+ return;
+
+ _hideList << filter;
return;
}