From e1fec99860444a4d319e08acac49c8c1013df51e Mon Sep 17 00:00:00 2001 From: Eric House Date: Thu, 19 Jul 2018 06:29:03 -0700 Subject: [PATCH] fix NPE by inspection I'm not sure how it happened -- race condition -- but it's harmless to drop the action when it does. --- .../app/src/main/java/org/eehouse/android/xw4/GameUtils.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/GameUtils.java b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/GameUtils.java index 56b71011b..2d9963ed5 100644 --- a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/GameUtils.java +++ b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/GameUtils.java @@ -1183,7 +1183,9 @@ public class GameUtils { boolean informNow ) { GameSummary summary = DBUtils.getSummary( context, lock ); - if ( DeviceRole.SERVER_STANDALONE != summary.serverRole ) { + if ( null == summary ) { + Log.e( TAG, "tellDied(): can't get summary" ); + } else if ( DeviceRole.SERVER_STANDALONE != summary.serverRole ) { int gameID = summary.gameID; GamePtr gamePtr = loadMakeGame( context, lock );