diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2011-09-16 15:51:18 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2011-09-16 15:51:18 +0200 |
commit | 22ff3b4d6268f2ded20a3e6d10642e45eefe5f8c (patch) | |
tree | 11c90f080e8a6e2bd1a24005fbd72a0ad0227cbc | |
parent | Prevent crash on "uncommon" pages (diff) | |
download | rekonq-22ff3b4d6268f2ded20a3e6d10642e45eefe5f8c.tar.xz |
Get sure page is extant before searching for DOM elements there
BUG: 282012
-rw-r--r-- | src/adblock/adblockmanager.cpp | 4 |
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)) |