check for null

This commit is contained in:
Eric House 2020-04-20 21:27:26 -07:00
parent f51030186f
commit 83a5d32ed0
2 changed files with 7 additions and 3 deletions

View file

@ -197,9 +197,13 @@ public class JNIThread extends Thread implements AutoCloseable {
m_queue.clear(); m_queue.clear();
} }
boolean success = false;
DictUtils.DictPairs pairs = null;
String[] dictNames = GameUtils.dictNames( context, m_lock ); String[] dictNames = GameUtils.dictNames( context, m_lock );
DictUtils.DictPairs pairs = DictUtils.openDicts( context, dictNames ); if ( null != dictNames ) {
boolean success = !pairs.anyMissing( dictNames ); pairs = DictUtils.openDicts( context, dictNames );
success = !pairs.anyMissing( dictNames );
}
if ( success ) { if ( success ) {
byte[] stream = GameUtils.savedGame( context, m_lock ); byte[] stream = GameUtils.savedGame( context, m_lock );

View file

@ -2527,7 +2527,7 @@
another crash. Do you want to open it anyway?</string> another crash. Do you want to open it anyway?</string>
<string name="unsafe_open_disregard">Open anyway</string> <string name="unsafe_open_disregard">Open anyway</string>
<string name="word_blocked_by_phony">Word %1$s not found in wordlist %2$s</string> <string name="word_blocked_by_phony">Word %1$s not found in wordlist %2$s.</string>
<string name="gamel_menu_logs">Debug logs</string> <string name="gamel_menu_logs">Debug logs</string>
<!-- Debug-build-only menu to turn on saving of logs --> <!-- Debug-build-only menu to turn on saving of logs -->