Fixed code that should have been enclosed in brackets but wasn't, causing the program flow to abort part way through the function
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12213 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1194,34 +1194,35 @@ void wxFrameLayout::UnhookFromFrame()
|
||||
// FOR NOW::
|
||||
|
||||
if ( mpFrame->GetEventHandler() == this )
|
||||
|
||||
{
|
||||
mpFrame->PopEventHandler();
|
||||
return;
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
// TBD ???: Cannot reach this code
|
||||
if ( mpFrame )
|
||||
{
|
||||
if ( this == mpFrame->GetEventHandler() )
|
||||
|
||||
{
|
||||
mpFrame->SetEventHandler( this->GetNextHandler() );
|
||||
}
|
||||
else
|
||||
{
|
||||
wxEvtHandler* pCur = mpFrame->GetEventHandler();
|
||||
|
||||
while ( pCur )
|
||||
{
|
||||
wxEvtHandler* pCur = mpFrame->GetEventHandler();
|
||||
if ( pCur == this )
|
||||
break;
|
||||
|
||||
while( pCur )
|
||||
{
|
||||
if ( pCur == this ) break;
|
||||
|
||||
pCur = pCur->GetNextHandler();
|
||||
}
|
||||
|
||||
// do not try to unhook ourselves if we're not hooked yet
|
||||
if ( !pCur ) return;
|
||||
pCur = pCur->GetNextHandler();
|
||||
}
|
||||
|
||||
if ( GetPreviousHandler() )
|
||||
// do not try to unhook ourselves if we're not hooked yet
|
||||
if ( !pCur )
|
||||
return;
|
||||
}
|
||||
|
||||
if ( GetPreviousHandler() )
|
||||
GetPreviousHandler()->SetNextHandler( GetNextHandler() );
|
||||
else
|
||||
{
|
||||
@@ -1229,9 +1230,7 @@ void wxFrameLayout::UnhookFromFrame()
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if ( GetNextHandler() )
|
||||
|
||||
GetNextHandler()->SetPreviousHandler( GetPreviousHandler() );
|
||||
|
||||
SetNextHandler( NULL );
|
||||
|
||||
Reference in New Issue
Block a user