mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-29 08:34:37 +01:00
use game dict if no player dict (to avoid NPE)
This commit is contained in:
parent
ecc5357ef8
commit
7a5920e9f2
2 changed files with 11 additions and 1 deletions
|
@ -676,7 +676,8 @@ public class GameConfig extends XWActivity
|
|||
|
||||
ArrayAdapter<String> adapter =
|
||||
DictLangCache.getDictsAdapter( this, m_gi.dictLang );
|
||||
configSpinnerWDownload( dictsSpinner, adapter, onSel, lp.dictName );
|
||||
configSpinnerWDownload( dictsSpinner, adapter, onSel,
|
||||
m_gi.dictName(lp) );
|
||||
}
|
||||
|
||||
private void configLangSpinner()
|
||||
|
|
|
@ -279,6 +279,15 @@ public class CurGameInfo {
|
|||
return DictLangCache.getLangName( m_context, dictLang );
|
||||
}
|
||||
|
||||
public String dictName( final LocalPlayer lp )
|
||||
{
|
||||
String dname = lp.dictName;
|
||||
if ( null == dname ) {
|
||||
dname = dictName;
|
||||
}
|
||||
return dname;
|
||||
}
|
||||
|
||||
public boolean addPlayer()
|
||||
{
|
||||
boolean added = nPlayers < MAX_NUM_PLAYERS;
|
||||
|
|
Loading…
Add table
Reference in a new issue