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:
@@ -170,6 +170,13 @@ wxWindowMac::~wxWindowMac()
|
|||||||
s_lastMouseWindow = NULL ;
|
s_lastMouseWindow = NULL ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wxFrame* frame = wxDynamicCast( wxGetTopLevelParent( this ) , wxFrame ) ;
|
||||||
|
if ( frame )
|
||||||
|
{
|
||||||
|
if ( frame->GetLastFocus() == this )
|
||||||
|
frame->SetLastFocus( NULL ) ;
|
||||||
|
}
|
||||||
|
|
||||||
if ( gFocusWindow == this )
|
if ( gFocusWindow == this )
|
||||||
{
|
{
|
||||||
gFocusWindow = NULL ;
|
gFocusWindow = NULL ;
|
||||||
|
@@ -170,6 +170,13 @@ wxWindowMac::~wxWindowMac()
|
|||||||
s_lastMouseWindow = NULL ;
|
s_lastMouseWindow = NULL ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wxFrame* frame = wxDynamicCast( wxGetTopLevelParent( this ) , wxFrame ) ;
|
||||||
|
if ( frame )
|
||||||
|
{
|
||||||
|
if ( frame->GetLastFocus() == this )
|
||||||
|
frame->SetLastFocus( NULL ) ;
|
||||||
|
}
|
||||||
|
|
||||||
if ( gFocusWindow == this )
|
if ( gFocusWindow == this )
|
||||||
{
|
{
|
||||||
gFocusWindow = NULL ;
|
gFocusWindow = NULL ;
|
||||||
|
Reference in New Issue
Block a user