0
0
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:
Issei Suzuki 2017-09-17 00:52:18 +02:00 committed by Tim Rae
parent 7ea1a66f8b
commit 39118e7462

View File

@ -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": {