]> git.saurik.com Git - wxWidgets.git/commitdiff
Fix for unsafe use of a global pointer for focus window: now checks at destruct
authorJulian Smart <julian@anthemion.co.uk>
Mon, 12 Feb 2001 13:45:18 +0000 (13:45 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Mon, 12 Feb 2001 13:45:18 +0000 (13:45 +0000)
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

src/gtk/window.cpp
src/gtk1/window.cpp

index 18713c609d181e23ccf2c760b710edba580bcaea..af70202eaaa82dc1298283bad8f019c190a07a9e 100644 (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;
 
index 18713c609d181e23ccf2c760b710edba580bcaea..af70202eaaa82dc1298283bad8f019c190a07a9e 100644 (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;