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:
parent
36583f13e1
commit
c72f4efc9c
1 changed files with 2 additions and 1 deletions
|
|
@ -61,7 +61,8 @@ public:
|
|||
|
||||
~AutoSystemDpiAware()
|
||||
{
|
||||
if ( ms_pfnSetThreadDpiAwarenessContext )
|
||||
if ( ms_pfnSetThreadDpiAwarenessContext &&
|
||||
ms_pfnSetThreadDpiAwarenessContext != (SetThreadDpiAwarenessContext_t)-1 )
|
||||
{
|
||||
ms_pfnSetThreadDpiAwarenessContext(m_prevContext);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue