send cancel if no dict's been chosen

Fix crash when game config opens dict download for result and nothing's
chosen. Was sending Activity.RESULT_OK in that case instead of
RESULT_CANCELED.
This commit is contained in:
Eric House 2016-08-15 07:19:05 -07:00
parent 87150c7d91
commit 10a0e33ee4

View file

@ -577,14 +577,14 @@ public class DictsDelegate extends ListDelegateBase
if ( handled ) {
clearSelections();
} else {
if ( null != m_lastLang && null != m_lastDict ) {
Intent intent = new Intent();
if ( null != m_lastLang ) {
intent.putExtra( RESULT_LAST_LANG, m_lastLang );
}
if ( null != m_lastDict ) {
intent.putExtra( RESULT_LAST_DICT, m_lastDict );
}
setResult( Activity.RESULT_OK, intent );
} else {
setResult( Activity.RESULT_CANCELED );
}
}
return handled;
}