mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-08 05:24:39 +01:00
fix NPE
I hope. Happens when there's a duplicate delete-deleted-game alert, and trying to close the view a second time may also be a problem.
This commit is contained in:
parent
fef7d2d544
commit
a95e761024
1 changed files with 4 additions and 1 deletions
|
@ -269,6 +269,7 @@ public class BoardDelegate extends DelegateBase
|
|||
.setMessage( getString( R.string.msg_dev_deleted_fmt, gameName ) )
|
||||
.setPositiveButton( android.R.string.ok, null );
|
||||
lstnr = new OnClickListener() {
|
||||
@Override
|
||||
public void onClick( DialogInterface dlg,
|
||||
int whichButton ) {
|
||||
deleteAndClose( gameID );
|
||||
|
@ -1684,7 +1685,9 @@ public class BoardDelegate extends DelegateBase
|
|||
private void deleteAndClose( int gameID )
|
||||
{
|
||||
if ( null != m_gi && gameID == m_gi.gameID ) {
|
||||
GameUtils.deleteGame( m_activity, m_jniThread.getLock(), false, false );
|
||||
if ( null != m_jniThread ) {
|
||||
GameUtils.deleteGame( m_activity, m_jniThread.getLock(), false, false );
|
||||
}
|
||||
} else {
|
||||
Log.e( TAG, "deleteAndClose() called with wrong gameID %d", gameID );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue