mirror of
https://github.com/wxWidgets/wxWidgets.git
synced 2026-10-06 07:00:16 +08:00
Fix crash when closing a wxColourDialog under MSW
Check that ms_pfnSetThreadDpiAwarenessContext function pointer was
initialized before using it.
This fixes a regression introduced in 9befda5c26 (Only use
AutoSystemDpiAware when displays have different DPI, 2023-12-10).
See #24121, #24196.
Closes #24288.
This commit is contained in:
committed by
Vadim Zeitlin
parent
36583f13e1
commit
c72f4efc9c
@@ -61,7 +61,8 @@ public:
|
||||
|
||||
~AutoSystemDpiAware()
|
||||
{
|
||||
if ( ms_pfnSetThreadDpiAwarenessContext )
|
||||
if ( ms_pfnSetThreadDpiAwarenessContext &&
|
||||
ms_pfnSetThreadDpiAwarenessContext != (SetThreadDpiAwarenessContext_t)-1 )
|
||||
{
|
||||
ms_pfnSetThreadDpiAwarenessContext(m_prevContext);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user