On Nexus 5x rotation with Invite/Wait alert up confuses things, and
eventually gets a NPE. This fixes that, but I still need to fix the
other.
This commit is contained in:
Eric House 2017-03-21 20:56:37 -07:00
parent 26d96136d8
commit d9a4783e32

View file

@ -101,10 +101,14 @@ public class DBAlert extends XWDialogFragment {
new Handler().post( new Runnable() {
@Override
public void run() {
DBAlert newMe = newInstance( mDlgID, mParams );
((MainActivity)getActivity()).show( newMe );
dismiss(); // kill myself...
MainActivity activity = (MainActivity)getActivity();
if ( null != activity ) {
DBAlert newMe = newInstance( mDlgID, mParams );
activity.show( newMe );
dismiss(); // kill myself...
} else {
DbgUtils.logd( TAG, "null activity..." );
}
}
} );
}