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

This commit is contained in:
Ray molenkamp 2016-11-30 18:26:25 -07:00
parent df63195d2a
commit 05b181fbc5
Notes: blender-bot 2023-02-14 11:08:33 +01:00
Referenced by issue #50149, Grease Pencil doesn't treat color like the rest of Blender
Referenced by issue #46795, Blender gives error message after closing user preferences
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}