mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-23 07:27:22 +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() {
|
new Handler().post( new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
DBAlert newMe = newInstance( mDlgID, mParams );
|
MainActivity activity = (MainActivity)getActivity();
|
||||||
((MainActivity)getActivity()).show( newMe );
|
if ( null != activity ) {
|
||||||
|
DBAlert newMe = newInstance( mDlgID, mParams );
|
||||||
dismiss(); // kill myself...
|
activity.show( newMe );
|
||||||
|
dismiss(); // kill myself...
|
||||||
|
} else {
|
||||||
|
DbgUtils.logd( TAG, "null activity..." );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue