diff options
| author | Liang Qi <liang.qi@qt.io> | 2024-11-21 07:05:11 +0100 |
|---|---|---|
| committer | Liang Qi <liang.qi@qt.io> | 2024-11-25 14:46:26 +0100 |
| commit | 7f06824408b5ff3f53d97298d960b7f5758286c9 (patch) | |
| tree | 59b368e1da0168ccd7d7ad80c930335802d70926 /src/widgets/dialogs | |
| parent | 0a8458b44d68ee436e731fc71bcae4eac18ccf9f (diff) | |
Guard the usages of QPlatformIntegration::services()
Task-number: QTBUG-130884
Pick-to: 6.8 6.5
Change-Id: I6c8060ce8b7a4e525c46e2e1fec227f46fe8c4d6
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/widgets/dialogs')
| -rw-r--r-- | src/widgets/dialogs/qcolordialog.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/dialogs/qcolordialog.cpp b/src/widgets/dialogs/qcolordialog.cpp index a923aef276a..ab6d581095c 100644 --- a/src/widgets/dialogs/qcolordialog.cpp +++ b/src/widgets/dialogs/qcolordialog.cpp @@ -1610,7 +1610,7 @@ void QColorDialogPrivate::pickScreenColor() Q_Q(QColorDialog); auto *platformServices = QGuiApplicationPrivate::platformIntegration()->services(); - if (platformServices->hasCapability(QPlatformServices::Capability::ColorPicking)) { + if (platformServices && platformServices->hasCapability(QPlatformServices::Capability::ColorPicking)) { if (auto *colorPicker = platformServices->colorPicker(q->windowHandle())) { q->connect(colorPicker, &QPlatformServiceColorPicker::colorPicked, q, [q, colorPicker](const QColor &color) { |
