mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-04 23:02:02 +01:00
fix crash when no radio's been chosen
This commit is contained in:
parent
97962fceed
commit
63262ba9b3
1 changed files with 22 additions and 20 deletions
|
@ -128,27 +128,29 @@ public class NewWithKnowns extends LinearLayout
|
||||||
|
|
||||||
void onButtonPressed( ButtonCallbacks procs )
|
void onButtonPressed( ButtonCallbacks procs )
|
||||||
{
|
{
|
||||||
Context context = getContext();
|
if ( 0 != mCurRadio ) {
|
||||||
String gameName = gameName();
|
Context context = getContext();
|
||||||
switch ( mCurRadio ) {
|
String gameName = gameName();
|
||||||
case R.id.radio_known:
|
switch ( mCurRadio ) {
|
||||||
DBUtils.setStringFor( context, KP_NAME_KEY, mCurKnown );
|
case R.id.radio_known:
|
||||||
procs.onUseKnown( mCurKnown, gameName );
|
DBUtils.setStringFor( context, KP_NAME_KEY, mCurKnown );
|
||||||
break;
|
procs.onUseKnown( mCurKnown, gameName );
|
||||||
case R.id.radio_unknown:
|
break;
|
||||||
case R.id.radio_default:
|
case R.id.radio_unknown:
|
||||||
procs.onStartGame( gameName, mStandalone, false );
|
case R.id.radio_default:
|
||||||
break;
|
procs.onStartGame( gameName, mStandalone, false );
|
||||||
case R.id.radio_configure:
|
break;
|
||||||
procs.onStartGame( gameName, mStandalone, true );
|
case R.id.radio_configure:
|
||||||
break;
|
procs.onStartGame( gameName, mStandalone, true );
|
||||||
default:
|
break;
|
||||||
Assert.failDbg();
|
default:
|
||||||
break;
|
Assert.failDbg(); // fired
|
||||||
}
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
String key = mStandalone ? KP_PREVSOLO_KEY : KP_PREVNET_KEY;
|
String key = mStandalone ? KP_PREVSOLO_KEY : KP_PREVNET_KEY;
|
||||||
DBUtils.setIntFor( context, key, mCurRadio );
|
DBUtils.setIntFor( context, key, mCurRadio );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private String gameName()
|
private String gameName()
|
||||||
|
|
Loading…
Reference in a new issue