[Bf-blender-cvs] [05b181f] master: Fix T46795 : Reset GWLP_USERDATA to NULL at window destruction so any future events will not try to reference this deleted class.

lazydodo noreply at git.blender.org
Thu Dec 1 02:26:29 CET 2016


Commit: 05b181fbc55ae9eac82d15e9abd45d32a2f386d8
Author: lazydodo
Date:   Wed Nov 30 18:26:25 2016 -0700
Branches: master
https://developer.blender.org/rB05b181fbc55ae9eac82d15e9abd45d32a2f386d8

Fix T46795 : Reset GWLP_USERDATA to NULL at window destruction so any future events will not try to reference this deleted class.

===================================================================

M	intern/ghost/intern/GHOST_WindowWin32.cpp

===================================================================

diff --git a/intern/ghost/intern/GHOST_WindowWin32.cpp b/intern/ghost/intern/GHOST_WindowWin32.cpp
index 2aa950f8..7d80aa4 100644
--- a/intern/ghost/intern/GHOST_WindowWin32.cpp
+++ b/intern/ghost/intern/GHOST_WindowWin32.cpp
@@ -353,7 +353,7 @@ GHOST_WindowWin32::~GHOST_WindowWin32()
 			// Release our reference of the DropTarget and it will delete itself eventually.
 			m_dropTarget->Release();
 		}
-
+		::SetWindowLongPtr(m_hWnd, GWLP_USERDATA, NULL);
 		::DestroyWindow(m_hWnd);
 		m_hWnd = 0;
 	}




More information about the Bf-blender-cvs mailing list