mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-31 19:57:06 +01:00
fix NPE
This commit is contained in:
parent
6d7d8d5c64
commit
a8c77bca88
1 changed files with 6 additions and 4 deletions
|
@ -824,10 +824,12 @@ public class GameConfig extends XWActivity
|
|||
ArrayAdapter<String> adapter,
|
||||
String sel )
|
||||
{
|
||||
for ( int ii = 0; ii < adapter.getCount(); ++ii ) {
|
||||
if ( sel.equals( adapter.getItem(ii) ) ) {
|
||||
spinner.setSelection( ii );
|
||||
break;
|
||||
if ( null != sel ) {
|
||||
for ( int ii = 0; ii < adapter.getCount(); ++ii ) {
|
||||
if ( sel.equals( adapter.getItem(ii) ) ) {
|
||||
spinner.setSelection( ii );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue