From 5b26ac92936a98f1fd688a9bb4464601b5b1c6f2 Mon Sep 17 00:00:00 2001 From: Charles Lombardo Date: Thu, 20 Apr 2023 17:43:19 -0400 Subject: [PATCH] android: Prevent potential abstract settings crash --- .../features/settings/ui/SettingsFragmentPresenter.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragmentPresenter.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragmentPresenter.kt index af85065d0b..29faed72de 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragmentPresenter.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragmentPresenter.kt @@ -31,6 +31,10 @@ class SettingsFragmentPresenter(private val fragmentView: SettingsFragmentView) } fun putSetting(setting: AbstractSetting) { + if (setting.section == null) { + return + } + val section = settings.getSection(setting.section!!)!! if (section.getSetting(setting.key!!) == null) { section.putSetting(setting)