Fix crash in QDesktopServices::openUrl() without QGuiApplication
Change-Id: Ib1a66c71725dac8fd7ba7ef3d432667b210df778 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>bb10
parent
d0d107ffc8
commit
f901b75926
|
|
@ -185,7 +185,12 @@ bool QDesktopServices::openUrl(const QUrl &url)
|
|||
}
|
||||
if (!url.isValid())
|
||||
return false;
|
||||
QPlatformServices *platformServices = QGuiApplicationPrivate::platformIntegration()->services();
|
||||
|
||||
QPlatformIntegration *platformIntegration = QGuiApplicationPrivate::platformIntegration();
|
||||
if (!platformIntegration)
|
||||
return false;
|
||||
|
||||
QPlatformServices *platformServices = platformIntegration->services();
|
||||
if (!platformServices) {
|
||||
qWarning("%s: The platform plugin does not support services.", Q_FUNC_INFO);
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Reference in New Issue