From f2ff596ff3a10fa2fb6be6436d01cc11aadfecae Mon Sep 17 00:00:00 2001 From: Eric House Date: Thu, 21 Nov 2013 18:57:58 -0800 Subject: [PATCH] fix NPE by checking --- .../XWords4/src/org/eehouse/android/xw4/GamesList.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GamesList.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GamesList.java index 95055778e..cee9da1eb 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GamesList.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GamesList.java @@ -1338,7 +1338,12 @@ public class GamesList extends XWExpandableListActivity private void selectJustLaunched() { clearSelections(); - m_adapter.getGameItemFor( m_launchedGame ).setSelected( true ); + if ( null != m_adapter ) { + GameListItem item = m_adapter.getGameItemFor( m_launchedGame ); + if ( null != item ) { + item.setSelected( true ); + } + } } public static void onGameDictDownload( Context context, Intent intent )