mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-09 05:24:44 +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 ) )
|
.setMessage( getString( R.string.msg_dev_deleted_fmt, gameName ) )
|
||||||
.setPositiveButton( android.R.string.ok, null );
|
.setPositiveButton( android.R.string.ok, null );
|
||||||
lstnr = new OnClickListener() {
|
lstnr = new OnClickListener() {
|
||||||
|
@Override
|
||||||
public void onClick( DialogInterface dlg,
|
public void onClick( DialogInterface dlg,
|
||||||
int whichButton ) {
|
int whichButton ) {
|
||||||
deleteAndClose( gameID );
|
deleteAndClose( gameID );
|
||||||
|
@ -1684,7 +1685,9 @@ public class BoardDelegate extends DelegateBase
|
||||||
private void deleteAndClose( int gameID )
|
private void deleteAndClose( int gameID )
|
||||||
{
|
{
|
||||||
if ( null != m_gi && gameID == m_gi.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 {
|
} else {
|
||||||
Log.e( TAG, "deleteAndClose() called with wrong gameID %d", gameID );
|
Log.e( TAG, "deleteAndClose() called with wrong gameID %d", gameID );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue