From ff6d91e42b3b578ca116dce61874e486c9c7a0fd Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Mon, 27 Aug 2018 15:34:05 +0200 Subject: [PATCH] Theme: Fix nullptr access On close this function gets called with a nullptr. Amends c79f436e2acb. Change-Id: Ie7c1e8d91fc0ff26208c6f2bbc108f32d47f3608 Reviewed-by: Eike Ziller --- src/libs/utils/theme/theme.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/utils/theme/theme.cpp b/src/libs/utils/theme/theme.cpp index a64b804d070..645550261f7 100644 --- a/src/libs/utils/theme/theme.cpp +++ b/src/libs/utils/theme/theme.cpp @@ -76,7 +76,7 @@ void setCreatorTheme(Theme *theme) #ifdef Q_OS_MACOS // Match the native UI theme and palette with the creator // theme by forcing light aqua for light creator themes. - if (!theme->flag(Theme::DarkUserInterface)) + if (theme && !theme->flag(Theme::DarkUserInterface)) Internal::forceMacOSLightAquaApperance(); #endif