diff options
author | Konstantin Ritt <ritt.ks@gmail.com> | 2010-12-01 13:46:24 +0300 |
---|---|---|
committer | axis <qt-info@nokia.com> | 2010-12-20 16:14:33 +0100 |
commit | 50af3716c956be0f50fdd896925da7af91d5da2c (patch) | |
tree | 880c47d07f6d9b536da32d2c08acfacdcc1df45a /src/gui/painting/qprinterinfo_win.cpp | |
parent | ed2abc6f5d8b2fe9e819d473768767c11f9c83ba (diff) |
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_win.cpp')
-rw-r--r-- | src/gui/painting/qprinterinfo_win.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/painting/qprinterinfo_win.cpp b/src/gui/painting/qprinterinfo_win.cpp index f7b6874bea..2d25063434 100644 --- a/src/gui/painting/qprinterinfo_win.cpp +++ b/src/gui/painting/qprinterinfo_win.cpp @@ -100,6 +100,8 @@ QList<QPrinter::PaperSize> QPrinterInfo::supportedPaperSizes() const const Q_D(QPrinterInfo); QList<QPrinter::PaperSize> paperSizes; + if (isNull()) + return paperSizes; DWORD size = DeviceCapabilities(reinterpret_cast<const wchar_t*>(d->name.utf16()), NULL, DC_PAPERS, NULL, NULL); |