android: PremiumSingleChoiceSetting: Add null check to avoid a crash.
This commit is contained in:
parent
26122505c4
commit
e2162c6168
@ -35,6 +35,9 @@ public final class PremiumSingleChoiceSetting extends SettingsItem {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public int getSelectedValue() {
|
public int getSelectedValue() {
|
||||||
|
if (getSetting() == null) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
return mPreferences.getInt(getSetting().getKey(), 0);
|
return mPreferences.getInt(getSetting().getKey(), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user