fix NPE I got once, presumably when activity shutting down.

This commit is contained in:
Andy2 2011-10-07 18:59:17 -07:00
parent f03699f701
commit 03543c17ea

View file

@ -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;