diff options
author | Harley Acheson <harley.acheson@gmail.com> | 2022-05-06 03:48:55 +0300 |
---|---|---|
committer | Harley Acheson <harley.acheson@gmail.com> | 2022-05-06 03:48:55 +0300 |
commit | fcbd81fb0f82080186220b554d12331b675f1e5e (patch) | |
tree | 480fae8459d93181096667b69c9e86e2cdb90c0a /intern | |
parent | 108963d508d41ac43b8a41a22c83bb6a67aa7ba6 (diff) |
Win32: WM_SETTINGCHANGE lParam Check for NULL
Check that lParam is non-NULL in WM_SETTINGCHANGE message handler.
See D14867 for details.
Differential Revision: https://developer.blender.org/D14867
Reviewed by Jesse Yurkovich
Diffstat (limited to 'intern')
-rw-r--r-- | intern/ghost/intern/GHOST_SystemWin32.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/intern/ghost/intern/GHOST_SystemWin32.cpp b/intern/ghost/intern/GHOST_SystemWin32.cpp index ff02bc5781e..ca4bfa634c1 100644 --- a/intern/ghost/intern/GHOST_SystemWin32.cpp +++ b/intern/ghost/intern/GHOST_SystemWin32.cpp @@ -1987,7 +1987,8 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam, } break; case WM_SETTINGCHANGE: - if (wcscmp(LPCWSTR(lParam), L"ImmersiveColorSet") == 0) { + /* Microsoft: "Note that some applications send this message with lParam set to NULL" */ + if ((lParam != NULL) && (wcscmp(LPCWSTR(lParam), L"ImmersiveColorSet") == 0)) { window->ThemeRefresh(); } break; |