summaryrefslogtreecommitdiff
path: root/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp')
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp
index 29bde0d54d..e4c2afc943 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp
@@ -1369,6 +1369,11 @@ void QWebFrame::print(QPrinter *printer) const
// paranoia check
fromPage = qMax(1, fromPage);
toPage = qMin(printContext.pageCount(), toPage);
+ if (toPage < fromPage) {
+ // if the user entered a page range outside the actual number
+ // of printable pages, just return
+ return;
+ }
if (printer->pageOrder() == QPrinter::LastPageFirst) {
int tmp = fromPage;