diff options
Diffstat (limited to 'core/java/android/view')
| -rw-r--r-- | core/java/android/view/MotionEvent.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/core/java/android/view/MotionEvent.java b/core/java/android/view/MotionEvent.java index 2402660..0d55679 100644 --- a/core/java/android/view/MotionEvent.java +++ b/core/java/android/view/MotionEvent.java @@ -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; + } } } } |
