diff options
author | Harley Acheson <harley.acheson@gmail.com> | 2022-01-28 23:03:20 +0300 |
---|---|---|
committer | Harley Acheson <harley.acheson@gmail.com> | 2022-01-28 23:03:20 +0300 |
commit | 26e608d820280340857fa547d477bc560e8cf605 (patch) | |
tree | 5699a6fbea99be89efaaceb3dc9c75e31ff2ed70 | |
parent | 82ad1631e46289020f132a7be8fbef2c86c071ff (diff) |
Win32: Initialize GHOST_WindowWin32 Members
Initialize m_Bar, m_dropTarget, & m_hWnd members of GHOST_WindowWin32
in constructor's member initializer list. This ensures they are are
set or NULL in destructor if constructor does not complete.
See D13886 for more details.
Differential Revision: https://developer.blender.org/D13886
Reviewed by Jesse Yurkovich
-rw-r--r-- | intern/ghost/intern/GHOST_WindowWin32.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/intern/ghost/intern/GHOST_WindowWin32.cpp b/intern/ghost/intern/GHOST_WindowWin32.cpp index b5d0fd8e6db..7993772a94b 100644 --- a/intern/ghost/intern/GHOST_WindowWin32.cpp +++ b/intern/ghost/intern/GHOST_WindowWin32.cpp @@ -71,6 +71,8 @@ GHOST_WindowWin32::GHOST_WindowWin32(GHOST_SystemWin32 *system, m_mousePresent(false), m_inLiveResize(false), m_system(system), + m_dropTarget(NULL), + m_hWnd(0), m_hDC(0), m_isDialog(dialog), m_hasMouseCaptured(false), @@ -78,6 +80,7 @@ GHOST_WindowWin32::GHOST_WindowWin32(GHOST_SystemWin32 *system, m_nPressedButtons(0), m_customCursor(0), m_wantAlphaBackground(alphaBackground), + m_Bar(NULL), m_wintab(NULL), m_lastPointerTabletData(GHOST_TABLET_DATA_NONE), m_normal_state(GHOST_kWindowStateNormal), |