mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-10-19 05:27:53 +00:00
android: Prevent potential abstract settings crash
This commit is contained in:
parent
77131b8ab0
commit
119fe3996d
1 changed files with 4 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue