am d4ed049: Merge branch \'readonly-p4-donut\' into donut

Merge commit 'd4ed0496724d9083ce0762d3a5c0b36183c02f6c'

* commit 'd4ed0496724d9083ce0762d3a5c0b36183c02f6c':
  AI 148024: fix NPE when there is no history
This commit is contained in:
Mitsuru Oshima
2009-04-29 23:20:11 -07:00
committed by The Android Open Source Project

View File

@@ -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;
}
}
}
}