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
|
||||
{
|
||||
wxWidgetIPhoneImpl* impl = (wxWidgetIPhoneImpl* ) wxWidgetImpl::FindFromWXWidget( [self view] );
|
||||
wxNonOwnedWindow* now = dynamic_cast<wxNonOwnedWindow*> (impl->GetWXPeer());
|
||||
wxNonOwnedWindowIPhoneImpl* nowimpl = dynamic_cast<wxNonOwnedWindowIPhoneImpl*> (now->GetNonOwnedPeer());
|
||||
|
||||
if ( nowimpl->InitialShowEventSent() )
|
||||
if( impl )
|
||||
{
|
||||
wxShowEvent eventShow(now->GetId(), false);
|
||||
eventShow.SetEventObject(now);
|
||||
|
||||
now->HandleWindowEvent(eventShow);
|
||||
wxNonOwnedWindow* now = dynamic_cast<wxNonOwnedWindow*> (impl->GetWXPeer());
|
||||
wxNonOwnedWindowIPhoneImpl* nowimpl = dynamic_cast<wxNonOwnedWindowIPhoneImpl*> (now->GetNonOwnedPeer());
|
||||
|
||||
if ( nowimpl->InitialShowEventSent() )
|
||||
{
|
||||
wxShowEvent eventShow(now->GetId(), false);
|
||||
eventShow.SetEventObject(now);
|
||||
|
||||
now->HandleWindowEvent(eventShow);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user