Fix for unsafe use of a global pointer for focus window: now checks at destruct

time to see if we should NULL the pointer.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9349 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2001-02-12 13:45:18 +00:00
parent 6e358ae704
commit 44cd54c24e
2 changed files with 6 additions and 0 deletions

View File

@@ -2334,6 +2334,9 @@ bool wxWindow::Create( wxWindow *parent, wxWindowID id,
wxWindow::~wxWindow()
{
if (g_focusWindow == this)
g_focusWindow = NULL;
m_isBeingDeleted = TRUE;
m_hasVMT = FALSE;

View File

@@ -2334,6 +2334,9 @@ bool wxWindow::Create( wxWindow *parent, wxWindowID id,
wxWindow::~wxWindow()
{
if (g_focusWindow == this)
g_focusWindow = NULL;
m_isBeingDeleted = TRUE;
m_hasVMT = FALSE;