Fix QTabBar crash with offscreen platform plugin

The offscreen implementation does not have a QPlatformNativeInterface
implementation.

Pick-to: 5.15
Change-Id: Ife4f296f52c307a2fab90de2cdc1ef0cc7796385
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
bb10
Filipe Azevedo 2020-05-18 15:36:53 +02:00
parent 4b23baddd3
commit 3197932e6f
1 changed files with 2 additions and 0 deletions

View File

@ -139,6 +139,8 @@ void QTabBarPrivate::updateMacBorderMetrics()
}
QPlatformNativeInterface *nativeInterface = QGuiApplication::platformNativeInterface();
if (!nativeInterface)
return;
quintptr identifier = reinterpret_cast<quintptr>(q);
// Set geometry