Merge pull request #211 from xbao/feature/202-dslv-crash

DragSortController: Check for null MotionEvent arguments (#202)
This commit is contained in:
Adrian Ulrich 2015-09-27 13:11:13 +02:00
commit 814e21f05f

View File

@ -378,6 +378,11 @@ public class DragSortController extends SimpleFloatViewManager implements View.O
@Override
public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY) {
// Guard against rare case of null MotionEvents on some devices
if (e1 == null || e2 == null) {
return false;
}
final int x1 = (int) e1.getX();
final int y1 = (int) e1.getY();
final int x2 = (int) e2.getX();