From 03543c17ea379cd46c2f5fec483483b6b223fc42 Mon Sep 17 00:00:00 2001 From: Andy2 Date: Fri, 7 Oct 2011 18:59:17 -0700 Subject: [PATCH] fix NPE I got once, presumably when activity shutting down. --- .../XWords4/src/org/eehouse/android/xw4/BoardActivity.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 d63f7c389..12159f683 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/BoardActivity.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/BoardActivity.java @@ -507,7 +507,8 @@ public class BoardActivity extends XWActivity // For now undo-last can crash the app or break a game in // networked case. Disable until this is fixed. - if ( m_gi.serverRole != DeviceRole.SERVER_STANDALONE ) { + if ( null != m_gi + && m_gi.serverRole != DeviceRole.SERVER_STANDALONE ) { menu.removeItem( R.id.board_menu_undo_last ); } return true;