mirror of
https://github.com/peterosterlund2/droidfish.git
synced 2024-11-23 11:31:33 +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;
|
||||
setPreviewColor();
|
||||
try {
|
||||
getOnPreferenceChangeListener().onPreferenceChange(this, color);
|
||||
} catch (NullPointerException e) {
|
||||
|
||||
Preference.OnPreferenceChangeListener listener = getOnPreferenceChangeListener();
|
||||
if (listener != null)
|
||||
listener.onPreferenceChange(this, color);
|
||||
} catch (NullPointerException ignore) {
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user