mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-08 05:24:39 +01:00
fix NPE (race condition around deletion?)
Check for null. Not sure how I got it there, but there's little harm in failing silently.
This commit is contained in:
parent
95c11eec07
commit
c4ac96ede8
1 changed files with 7 additions and 3 deletions
|
@ -274,9 +274,13 @@ public class GameUtils {
|
|||
|
||||
public static void deleteGame( Context context, GameLock lock, boolean informNow )
|
||||
{
|
||||
tellDied( context, lock, informNow );
|
||||
Utils.cancelNotification( context, (int)lock.getRowid() );
|
||||
DBUtils.deleteGame( context, lock );
|
||||
if ( null != lock ) {
|
||||
tellDied( context, lock, informNow );
|
||||
Utils.cancelNotification( context, (int)lock.getRowid() );
|
||||
DBUtils.deleteGame( context, lock );
|
||||
} else {
|
||||
Log.e( TAG, "deleteGame(): null lock; doing nothing" );
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean deleteGame( Context context, long rowid,
|
||||
|
|
Loading…
Reference in a new issue