I think I'm in a bad state when this happens, but no point in
crashing regardless.
This commit is contained in:
Eric House 2016-07-13 17:08:39 -07:00
parent 472a173297
commit dcb4968ed9

View file

@ -184,8 +184,8 @@ public class MainActivity extends XWActivity
View child = m_root.getChildAt( m_root.getChildCount() - 1 );
Fragment frag = getSupportFragmentManager()
.findFragmentById( child.getId() );
boolean handled = ((XWFragment)frag).getDelegate()
.handleBackPressed();
boolean handled = null != frag
&&((XWFragment)frag).getDelegate().handleBackPressed();
return handled;
}