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);