diff --git a/src/plugins/platforms/ios/qiosscreen.mm b/src/plugins/platforms/ios/qiosscreen.mm index 65a8c21060c..b54c696f3f3 100644 --- a/src/plugins/platforms/ios/qiosscreen.mm +++ b/src/plugins/platforms/ios/qiosscreen.mm @@ -186,6 +186,9 @@ static QIOSScreen* qtPlatformScreenFor(UIScreen *uiScreen) { [super traitCollectionDidChange:previousTraitCollection]; + if (!qGuiApp) + return; + Qt::ColorScheme colorScheme = self.traitCollection.userInterfaceStyle == UIUserInterfaceStyleDark ? Qt::ColorScheme::Dark