1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-12-30 12:35:48 +01:00

Fix crash when device has no device specific settings

This commit is contained in:
José Rebelo 2022-07-28 00:35:12 +01:00 committed by Gitea
parent b138c54b52
commit 03db850b3e

View File

@ -950,11 +950,11 @@ public class DeviceSpecificSettingsFragment extends PreferenceFragmentCompat imp
* @param preferenceGroup the {@link PreferenceGroup} for which preferences will be reloaded
*/
private void reloadPreferences(final SharedPreferences sharedPreferences, final PreferenceGroup preferenceGroup) {
for (int i = 0; i < preferenceGroup.getPreferenceCount(); i++) {
if (preferenceGroup == null) {
return;
}
if (preferenceGroup == null) {
return;
}
for (int i = 0; i < preferenceGroup.getPreferenceCount(); i++) {
final Preference preference = preferenceGroup.getPreference(i);
LOG.debug("Reloading {}", preference.getKey());