mirror of
https://git.h3cjp.net/H3cJP/yuzu.git
synced 2024-11-15 18:43:00 +00:00
android: Prevent potential abstract settings crash
This commit is contained in:
parent
b6f57da70a
commit
5b26ac9293
|
@ -31,6 +31,10 @@ class SettingsFragmentPresenter(private val fragmentView: SettingsFragmentView)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun putSetting(setting: AbstractSetting) {
|
fun putSetting(setting: AbstractSetting) {
|
||||||
|
if (setting.section == null) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
val section = settings.getSection(setting.section!!)!!
|
val section = settings.getSection(setting.section!!)!!
|
||||||
if (section.getSetting(setting.key!!) == null) {
|
if (section.getSetting(setting.key!!) == null) {
|
||||||
section.putSetting(setting)
|
section.putSetting(setting)
|
||||||
|
|
Loading…
Reference in a new issue