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:
Joshua Gross
2021-07-07 13:36:34 -07:00
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,