From 26e608d820280340857fa547d477bc560e8cf605 Mon Sep 17 00:00:00 2001 From: Harley Acheson Date: Fri, 28 Jan 2022 12:03:20 -0800 Subject: 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 --- intern/ghost/intern/GHOST_WindowWin32.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'intern/ghost') 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), -- cgit v1.2.3