QToolBar: Don't crash on macOS with 'minimal' QPA plugin

'minimal' doesn't provide any native interface.

Change-Id: I116c9905977ccc6ededf0c6c41b92b6f785f2875
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
bb10
Gabriel de Dietrich 2017-11-14 09:28:06 -07:00 committed by Liang Qi
parent 77ee9bd1d3
commit 4532a9590b
1 changed files with 2 additions and 0 deletions

View File

@ -1120,6 +1120,8 @@ static bool waitForPopup(QToolBar *tb, QWidget *popup)
static void enableMacToolBar(QToolBar *toolbar, bool enable)
{
QPlatformNativeInterface *nativeInterface = QApplication::platformNativeInterface();
if (!nativeInterface)
return;
QPlatformNativeInterface::NativeResourceForIntegrationFunction function =
nativeInterface->nativeResourceFunctionForIntegration("setContentBorderAreaEnabled");
if (!function)