override onResume not onStart to fix NPE

When game's resumed (brought from background) and Wait alert is up
onStart() is called before getDialog() has a non-null value to
return. onResume() is the place to modify the dialog.
This commit is contained in:
Eric House 2017-03-27 07:07:05 -07:00
parent 58e5145296
commit e7a2657a91

View file

@ -47,9 +47,9 @@ class XWDialogFragment extends DialogFragment {
} }
@Override @Override
public void onStart() public void onResume()
{ {
super.onStart(); super.onResume();
if ( null != m_buttonMap ) { if ( null != m_buttonMap ) {
AlertDialog dialog = (AlertDialog)getDialog(); AlertDialog dialog = (AlertDialog)getDialog();