diff --git a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/DBAlert.java b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/DBAlert.java index 4b8cf724b..94b4cc7b9 100644 --- a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/DBAlert.java +++ b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/DBAlert.java @@ -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..." ); + } } } ); }