mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-30 10:26:58 +01:00
fix NPE likely introduced by lang->isoCode changes
This commit is contained in:
parent
2a6d1a0af2
commit
6720367e66
1 changed files with 2 additions and 3 deletions
|
@ -97,8 +97,7 @@ public class DictLangCache {
|
|||
{
|
||||
int result = -1;
|
||||
for ( int ii = 0; ii < getCount(); ++ii ) {
|
||||
String code = getLangAtPosition( ii );
|
||||
if ( code.equals( lang ) ) {
|
||||
if ( lang.equals( getLangAtPosition( ii ) ) ) {
|
||||
result = ii;
|
||||
break;
|
||||
}
|
||||
|
@ -177,7 +176,7 @@ public class DictLangCache {
|
|||
boolean found = false;
|
||||
DictInfo[] infos = getInfosHaveLang( context, isoCode );
|
||||
for ( DictInfo info : infos ) {
|
||||
if ( info.name.equals( name ) ) {
|
||||
if ( name.equals( info.name ) ) {
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue