mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-27 20:36:51 +01:00
Discovery: prevent crash on long tap when a device has no device specific settings
This commit is contained in:
parent
7cf7d615a6
commit
6ce62008dd
@ -951,6 +951,10 @@ public class DeviceSpecificSettingsFragment extends PreferenceFragmentCompat imp
|
|||||||
*/
|
*/
|
||||||
private void reloadPreferences(final SharedPreferences sharedPreferences, final PreferenceGroup preferenceGroup) {
|
private void reloadPreferences(final SharedPreferences sharedPreferences, final PreferenceGroup preferenceGroup) {
|
||||||
for (int i = 0; i < preferenceGroup.getPreferenceCount(); i++) {
|
for (int i = 0; i < preferenceGroup.getPreferenceCount(); i++) {
|
||||||
|
if (preferenceGroup == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
final Preference preference = preferenceGroup.getPreference(i);
|
final Preference preference = preferenceGroup.getPreference(i);
|
||||||
|
|
||||||
LOG.debug("Reloading {}", preference.getKey());
|
LOG.debug("Reloading {}", preference.getKey());
|
||||||
|
Loading…
Reference in New Issue
Block a user