Skip to content

Commit

Permalink
fix(android): NPE fix
Browse files Browse the repository at this point in the history
  • Loading branch information
farfromrefug committed Jun 4, 2021
1 parent 6537d71 commit 4c57840
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,12 @@ private static boolean tryIntercept(View view, MotionEvent event) {

@Override
protected void onCancel() {

View view = getView();
if (view == null) {
return;
}
if (GestureHandler.debug) {
Log.d("JS", "NativeViewGestureHandler onCancel " + getView());
Log.d("JS", "NativeViewGestureHandler onCancel " + view);
}
long time = SystemClock.uptimeMillis();
MotionEvent event = MotionEvent.obtain(time, time, MotionEvent.ACTION_CANCEL, 0, 0, 0);
Expand Down

0 comments on commit 4c57840

Please sign in to comment.