mirror of
https://github.com/ankidroid/Anki-Android.git
synced 2024-09-20 03:52:15 +02:00
Fix a crash bug on some Android N devices. (#4706)
This commit is contained in:
parent
7ea1a66f8b
commit
39118e7462
@ -460,6 +460,10 @@ public class Preferences extends AppCompatPreferenceActivity implements Preferen
|
||||
try {
|
||||
PreferenceScreen screen = listener.getPreferenceScreen();
|
||||
Preference pref = screen.findPreference(key);
|
||||
if (pref == null) {
|
||||
Timber.e("Preferences: no preference found for the key: %s", key);
|
||||
return;
|
||||
}
|
||||
// Handle special cases
|
||||
switch (key) {
|
||||
case "timeoutAnswer": {
|
||||
|
Loading…
Reference in New Issue
Block a user