From 37a79b25f6e882e67995b550a7f45b388bd4dc4a Mon Sep 17 00:00:00 2001 From: Eric House Date: Sat, 14 Sep 2013 21:22:06 -0700 Subject: [PATCH] fix reported NPE (by inspection, as I can't repro) --- .../src/org/eehouse/android/xw4/BoardActivity.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/BoardActivity.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/BoardActivity.java index 38452f001..48fb864f7 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/BoardActivity.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/BoardActivity.java @@ -2081,9 +2081,13 @@ public class BoardActivity extends XWActivity private void setBackgroundColor() { - int back = CommonPrefs.get( this ) - .otherColors[CommonPrefs.COLOR_BACKGRND]; - findViewById(R.id.board_root).setBackgroundColor( back ); + View view = findViewById( R.id.board_root ); + // Google's reported an NPE here, so test + if ( null != view ) { + int back = CommonPrefs.get( this ) + .otherColors[CommonPrefs.COLOR_BACKGRND]; + view.setBackgroundColor( back ); + } } private void setKeepScreenOn()