summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qprinterinfo_unix.cpp
diff options
context:
space:
mode:
authorKonstantin Ritt <ritt.ks@gmail.com>2010-12-01 10:46:24 (GMT)
committeraxis <qt-info@nokia.com>2010-12-20 15:14:33 (GMT)
commit50af3716c956be0f50fdd896925da7af91d5da2c (patch)
tree880c47d07f6d9b536da32d2c08acfacdcc1df45a /src/gui/painting/qprinterinfo_unix.cpp
parented2abc6f5d8b2fe9e819d473768767c11f9c83ba (diff)
downloadQt-50af3716c956be0f50fdd896925da7af91d5da2c.zip
Qt-50af3716c956be0f50fdd896925da7af91d5da2c.tar.gz
Qt-50af3716c956be0f50fdd896925da7af91d5da2c.tar.bz2
QPrinterInfo::supportedPaperSizes(): return early if the info is invalid
e.g. don't report supported paper sized in any case Merge-request: 2516 Signed-off-by: axis
Diffstat (limited to 'src/gui/painting/qprinterinfo_unix.cpp')
-rw-r--r--src/gui/painting/qprinterinfo_unix.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/painting/qprinterinfo_unix.cpp b/src/gui/painting/qprinterinfo_unix.cpp
index be24bd7..af2e52a 100644
--- a/src/gui/painting/qprinterinfo_unix.cpp
+++ b/src/gui/painting/qprinterinfo_unix.cpp
@@ -898,6 +898,9 @@ QList<QPrinter::PaperSize> QPrinterInfo::supportedPaperSizes() const
#if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY)
const Q_D(QPrinterInfo);
+ if (isNull())
+ return d->paperSizes;
+
if (!d->hasPaperSizes) {
d->hasPaperSizes = true;