summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dedietrich@qt.io>2017-11-14 09:28:06 -0700
committerLiang Qi <liang.qi@qt.io>2017-11-17 13:30:26 +0000
commit4532a9590b0859c7504a15f679df2bfaee726874 (patch)
tree74df1bca141603af1a08e1577e00c03fcfe14140 /src
parent77ee9bd1d3917b2bb1e442433ef0189e9e281e51 (diff)
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>
Diffstat (limited to 'src')
-rw-r--r--src/widgets/widgets/qtoolbar.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/widgets/widgets/qtoolbar.cpp b/src/widgets/widgets/qtoolbar.cpp
index 663e8214c0..243fb6d555 100644
--- a/src/widgets/widgets/qtoolbar.cpp
+++ b/src/widgets/widgets/qtoolbar.cpp
@@ -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)