Merge "Settings is crashed high probability when doing follow steps"

This commit is contained in:
Treehugger Robot
2017-09-06 00:12:44 +00:00
committed by Gerrit Code Review

View File

@@ -558,7 +558,7 @@ public class FingerprintSettings extends SubSettings {
String prefName = genKey(fpId);
FingerprintPreference fpref = (FingerprintPreference) findPreference(prefName);
final Drawable highlight = getHighlightDrawable();
if (highlight != null) {
if (highlight != null && fpref != null) {
final View view = fpref.getView();
final int centerX = view.getWidth() / 2;
final int centerY = view.getHeight() / 2;