From 3197932e6fb03fb9c0ff669af858cb94e3836d79 Mon Sep 17 00:00:00 2001 From: Filipe Azevedo Date: Mon, 18 May 2020 15:36:53 +0200 Subject: 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 --- src/widgets/widgets/qtabbar.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/widgets/widgets/qtabbar.cpp b/src/widgets/widgets/qtabbar.cpp index 7bd346981a..0f0fa52a05 100644 --- a/src/widgets/widgets/qtabbar.cpp +++ b/src/widgets/widgets/qtabbar.cpp @@ -139,6 +139,8 @@ void QTabBarPrivate::updateMacBorderMetrics() } QPlatformNativeInterface *nativeInterface = QGuiApplication::platformNativeInterface(); + if (!nativeInterface) + return; quintptr identifier = reinterpret_cast(q); // Set geometry -- cgit v1.2.3