mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-09 05:24:44 +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
fdf27e901a
commit
c172a0aa0c
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 )
|
public static void deleteGame( Context context, GameLock lock, boolean informNow )
|
||||||
{
|
{
|
||||||
tellDied( context, lock, informNow );
|
if ( null != lock ) {
|
||||||
Utils.cancelNotification( context, (int)lock.getRowid() );
|
tellDied( context, lock, informNow );
|
||||||
DBUtils.deleteGame( context, lock );
|
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,
|
public static boolean deleteGame( Context context, long rowid,
|
||||||
|
|
Loading…
Reference in a new issue