mirror of
https://github.com/peterosterlund2/droidfish.git
synced 2025-04-03 19:00:43 +02:00
Avoid NPE in ColorPickerPreference.java.
This commit is contained in:
parent
b1f6cae789
commit
93809f5b91
@ -181,9 +181,10 @@ public class ColorPickerPreference
|
||||
mValue = color;
|
||||
setPreviewColor();
|
||||
try {
|
||||
getOnPreferenceChangeListener().onPreferenceChange(this, color);
|
||||
} catch (NullPointerException e) {
|
||||
|
||||
Preference.OnPreferenceChangeListener listener = getOnPreferenceChangeListener();
|
||||
if (listener != null)
|
||||
listener.onPreferenceChange(this, color);
|
||||
} catch (NullPointerException ignore) {
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user