AI 148024: fix NPE when there is no history
Automated import of CL 148024
This commit is contained in:
committed by
The Android Open Source Project
parent
8169daed2f
commit
dffbb4dbce
@@ -225,10 +225,12 @@ public final class MotionEvent implements Parcelable {
|
||||
mSize *= scale;
|
||||
mXPrecision *= scale;
|
||||
mYPrecision *= scale;
|
||||
float[] history = mHistory;
|
||||
int length = history.length;
|
||||
for (int i = 0; i < length; i++) {
|
||||
history[i] *= scale;
|
||||
if (mHistory != null) {
|
||||
float[] history = mHistory;
|
||||
int length = history.length;
|
||||
for (int i = 0; i < length; i++) {
|
||||
history[i] *= scale;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user