fix, by inspection, NPE reported through the Play Store.

This commit is contained in:
Eric House 2015-09-28 06:46:37 -07:00
parent e9059cba47
commit f363fadf39

View file

@ -788,6 +788,7 @@ public class GameConfigDelegate extends DelegateBase
private void loadPlayersList() private void loadPlayersList()
{ {
if ( null != m_gameLock ) {
m_playerLayout.removeAllViews(); m_playerLayout.removeAllViews();
String[] names = m_gi.visibleNames( false ); String[] names = m_gi.visibleNames( false );
@ -836,6 +837,7 @@ public class GameConfigDelegate extends DelegateBase
showDialog( DlgID.FORCE_REMOTE ); showDialog( DlgID.FORCE_REMOTE );
} }
adjustPlayersLabel(); adjustPlayersLabel();
}
} // loadPlayersList } // loadPlayersList
private void configDictSpinner( Spinner dictsSpinner, int lang, private void configDictSpinner( Spinner dictsSpinner, int lang,
@ -886,6 +888,7 @@ public class GameConfigDelegate extends DelegateBase
public void onItemSelected(AdapterView<?> parentView, public void onItemSelected(AdapterView<?> parentView,
View selectedItemView, View selectedItemView,
int position, long id ) { int position, long id ) {
if ( null != m_gameLock ) { // not on the way out?
String chosen = String chosen =
(String)parentView.getItemAtPosition( position ); (String)parentView.getItemAtPosition( position );
if ( chosen.equals( m_browseText ) ) { if ( chosen.equals( m_browseText ) ) {
@ -895,6 +898,7 @@ public class GameConfigDelegate extends DelegateBase
selLangChanged( langName ); selLangChanged( langName );
} }
} }
}
@Override @Override
public void onNothingSelected(AdapterView<?> parentView) {} public void onNothingSelected(AdapterView<?> parentView) {}