1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-24 10:22:15 -05:00

Guard against fling events that only have one motionevent defined

This commit is contained in:
Jesse Vincent 2010-01-19 00:15:21 +00:00
parent 21aa687ee3
commit 23af9f3e6d

View File

@ -1332,6 +1332,9 @@ public class MessageList
public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY)
{ {
if (e2 == null || e1 == null)
return true;
float deltaX = e2.getX() - e1.getX(), float deltaX = e2.getX() - e1.getX(),
deltaY = e2.getY() - e1.getY(); deltaY = e2.getY() - e1.getY();