guarding code in case of delayed controller release
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66741 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -407,15 +407,18 @@ wxWidgetImpl* wxWidgetImpl::CreateContentView( wxNonOwnedWindow* now )
|
|||||||
-(void) viewWillDisappear:(BOOL)animated
|
-(void) viewWillDisappear:(BOOL)animated
|
||||||
{
|
{
|
||||||
wxWidgetIPhoneImpl* impl = (wxWidgetIPhoneImpl* ) wxWidgetImpl::FindFromWXWidget( [self view] );
|
wxWidgetIPhoneImpl* impl = (wxWidgetIPhoneImpl* ) wxWidgetImpl::FindFromWXWidget( [self view] );
|
||||||
wxNonOwnedWindow* now = dynamic_cast<wxNonOwnedWindow*> (impl->GetWXPeer());
|
if( impl )
|
||||||
wxNonOwnedWindowIPhoneImpl* nowimpl = dynamic_cast<wxNonOwnedWindowIPhoneImpl*> (now->GetNonOwnedPeer());
|
|
||||||
|
|
||||||
if ( nowimpl->InitialShowEventSent() )
|
|
||||||
{
|
{
|
||||||
wxShowEvent eventShow(now->GetId(), false);
|
wxNonOwnedWindow* now = dynamic_cast<wxNonOwnedWindow*> (impl->GetWXPeer());
|
||||||
eventShow.SetEventObject(now);
|
wxNonOwnedWindowIPhoneImpl* nowimpl = dynamic_cast<wxNonOwnedWindowIPhoneImpl*> (now->GetNonOwnedPeer());
|
||||||
|
|
||||||
now->HandleWindowEvent(eventShow);
|
if ( nowimpl->InitialShowEventSent() )
|
||||||
|
{
|
||||||
|
wxShowEvent eventShow(now->GetId(), false);
|
||||||
|
eventShow.SetEventObject(now);
|
||||||
|
|
||||||
|
now->HandleWindowEvent(eventShow);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user