mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Ensure that TouchEvent is initialized with a valid MotionEvent
Summary: It is unlikely but possible that the crash T94864568 is caused by a TouchEvent being initialized with a null MotionEvent. Regardless, we should guard against this case. Changelog: [Internal] Reviewed By: ShikaSD Differential Revision: D29594750 fbshipit-source-id: 3a409b716a9f1eec8017002ae7e23273677e53ba
This commit is contained in:
committed by
Facebook GitHub Bot
parent
b52950bda2
commit
3b569b8aff
@@ -43,7 +43,7 @@ public class TouchEvent extends Event<TouchEvent> {
|
||||
-1,
|
||||
viewTag,
|
||||
touchEventType,
|
||||
motionEventToCopy,
|
||||
Assertions.assertNotNull(motionEventToCopy),
|
||||
gestureStartTime,
|
||||
viewX,
|
||||
viewY,
|
||||
@@ -67,7 +67,7 @@ public class TouchEvent extends Event<TouchEvent> {
|
||||
surfaceId,
|
||||
viewTag,
|
||||
touchEventType,
|
||||
motionEventToCopy,
|
||||
Assertions.assertNotNull(motionEventToCopy),
|
||||
gestureStartTime,
|
||||
viewX,
|
||||
viewY,
|
||||
|
||||
Reference in New Issue
Block a user