Skip to content

Commit

Permalink
FUS-156845, fix a large CER buckets with dereference of a null pointe…
Browse files Browse the repository at this point in the history
…r to QWindowsIntegration::instance() during Fusion shutdown. The solution is to add codes to do a null check
  • Loading branch information
zhaojz2308 committed Aug 8, 2024
1 parent 0519e86 commit 34621e8
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions src/plugins/platforms/windows/qwindowscontext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1026,16 +1026,18 @@ bool QWindowsContext::windowsProc(HWND hwnd, UINT message,
const bool darkMode = QWindowsTheme::queryDarkMode();
const bool darkModeChanged = darkMode != QWindowsContextPrivate::m_darkMode;
QWindowsContextPrivate::m_darkMode = darkMode;
auto integration = QWindowsIntegration::instance();
integration->updateApplicationBadge();
if (integration->darkModeHandling().testFlag(QWindowsApplication::DarkModeStyle)) {
QWindowsTheme::instance()->refresh();
QWindowSystemInterface::handleThemeChange();
}
if (darkModeChanged) {
if (integration->darkModeHandling().testFlag(QWindowsApplication::DarkModeWindowFrames)) {
for (QWindowsWindow *w : d->m_windows)
w->setDarkBorder(QWindowsContextPrivate::m_darkMode);
if (auto integration = QWindowsIntegration::instance()) // integration may be null during shutdown
{
integration->updateApplicationBadge();
if (integration->darkModeHandling().testFlag(QWindowsApplication::DarkModeStyle)) {
QWindowsTheme::instance()->refresh();
QWindowSystemInterface::handleThemeChange();
}
if (darkModeChanged) {
if (integration->darkModeHandling().testFlag(QWindowsApplication::DarkModeWindowFrames)) {
for (QWindowsWindow* w : d->m_windows)
w->setDarkBorder(QWindowsContextPrivate::m_darkMode);
}
}
}
}
Expand Down

0 comments on commit 34621e8

Please sign in to comment.