mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-07 05:24:46 +01:00
fix NPE
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:
parent
26d96136d8
commit
d9a4783e32
1 changed files with 8 additions and 4 deletions
|
@ -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..." );
|
||||
}
|
||||
}
|
||||
} );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue