summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2011-09-16 15:51:18 +0200
committerAndrea Diamantini <adjam7@gmail.com>2011-09-16 15:51:18 +0200
commit22ff3b4d6268f2ded20a3e6d10642e45eefe5f8c (patch)
tree11c90f080e8a6e2bd1a24005fbd72a0ad0227cbc /src
parentPrevent crash on "uncommon" pages (diff)
downloadrekonq-22ff3b4d6268f2ded20a3e6d10642e45eefe5f8c.tar.xz
Get sure page is extant before searching for DOM elements there
BUG: 282012
Diffstat (limited to 'src')
-rw-r--r--src/adblock/adblockmanager.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/adblock/adblockmanager.cpp b/src/adblock/adblockmanager.cpp
index 40e23d5f..7c0b94f2 100644
--- a/src/adblock/adblockmanager.cpp
+++ b/src/adblock/adblockmanager.cpp
@@ -207,6 +207,10 @@ QNetworkReply *AdBlockManager::block(const QNetworkRequest &request, WebPage *pa
return reply;
}
+ // get sure page is extant to perform elements check. bug:282012
+ if (!page)
+ return 0;
+
foreach(const AdBlockRule & filter, _blackList)
{
if (filter.match(request, urlString, urlStringLowerCase))