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