summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTrond Kjernåsen <trond.kjernasen@nokia.com>2010-05-11 07:58:41 (GMT)
committerTrond Kjernåsen <trond.kjernasen@nokia.com>2010-05-11 07:59:50 (GMT)
commit4d36724867d77f3c8bf31b084ef8beae3a9646b3 (patch)
tree7bf66316eb1d32a42ae4c1de345853c9afef823a
parentde35f4df32f1348af48eb965b78a66dc86ad72fd (diff)
downloadQt-4d36724867d77f3c8bf31b084ef8beae3a9646b3.zip
Qt-4d36724867d77f3c8bf31b084ef8beae3a9646b3.tar.gz
Qt-4d36724867d77f3c8bf31b084ef8beae3a9646b3.tar.bz2
Fixed a potential crash with misconfigured CUPS printers.
Task-number: QTBUG-10512 Reviewed-by: Kim
-rw-r--r--src/gui/dialogs/qprintdialog_unix.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/dialogs/qprintdialog_unix.cpp b/src/gui/dialogs/qprintdialog_unix.cpp
index 00dc3e6..9135350 100644
--- a/src/gui/dialogs/qprintdialog_unix.cpp
+++ b/src/gui/dialogs/qprintdialog_unix.cpp
@@ -968,7 +968,7 @@ void QUnixPrintWidgetPrivate::_q_btnPropertiesClicked()
#if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY)
void QUnixPrintWidgetPrivate::setCupsProperties()
{
- if (cups && QCUPSSupport::isAvailable()) {
+ if (cups && QCUPSSupport::isAvailable() && cups->pageSizes()) {
QPrintEngine *engine = printer->printEngine();
const ppd_option_t* pageSizes = cups->pageSizes();
QByteArray cupsPageSize;