make sure we don't keep a focus pointer to a window that gets deleted

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16705 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor 2002-08-23 13:31:14 +00:00
parent ef08713a5b
commit fd76aa8d8a
2 changed files with 14 additions and 0 deletions

View File

@ -169,6 +169,13 @@ wxWindowMac::~wxWindowMac()
{
s_lastMouseWindow = NULL ;
}
wxFrame* frame = wxDynamicCast( wxGetTopLevelParent( this ) , wxFrame ) ;
if ( frame )
{
if ( frame->GetLastFocus() == this )
frame->SetLastFocus( NULL ) ;
}
if ( gFocusWindow == this )
{

View File

@ -169,6 +169,13 @@ wxWindowMac::~wxWindowMac()
{
s_lastMouseWindow = NULL ;
}
wxFrame* frame = wxDynamicCast( wxGetTopLevelParent( this ) , wxFrame ) ;
if ( frame )
{
if ( frame->GetLastFocus() == this )
frame->SetLastFocus( NULL ) ;
}
if ( gFocusWindow == this )
{