summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2015-01-04 23:05:15 +0100
committerGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2015-01-05 15:50:55 +0100
commitbc7243d5832e466772734e24991025e0e8b067b0 (patch)
treefcd1cf25bf210d4b272157dfe586bda7075745a4
parent73fcae871668f4f042a5a3a04e0f06641816e169 (diff)
QColorDialog: fix a crash on small displays
On a small display leftLay is left initialized to a null pointer, therefore don't try to dereference it. Task-number: QTBUG-43643 Change-Id: I9d22dac88a3a853ce154a6f64b35fc113abd9262 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
-rw-r--r--src/widgets/dialogs/qcolordialog.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/widgets/dialogs/qcolordialog.cpp b/src/widgets/dialogs/qcolordialog.cpp
index b69dbfd650..f7f45c74ac 100644
--- a/src/widgets/dialogs/qcolordialog.cpp
+++ b/src/widgets/dialogs/qcolordialog.cpp
@@ -1768,7 +1768,8 @@ void QColorDialogPrivate::initWidgets()
topLay->addWidget(cs);
#else
rightLay->addWidget(cs);
- leftLay->addSpacing(cs->gl->margin());
+ if (leftLay)
+ leftLay->addSpacing(cs->gl->margin());
#endif
buttons = new QDialogButtonBox(q);