mirror of
https://github.com/status-im/react-native-camera.git
synced 2026-08-31 13:41:08 +00:00
Fix for: Fast swiping and touching while component is being loaded can cause _camera to be null.
This commit is contained in:
@@ -359,6 +359,11 @@ class RCTCameraViewFinder extends TextureView implements TextureView.SurfaceText
|
||||
|
||||
@Override
|
||||
public boolean onTouchEvent(MotionEvent event) {
|
||||
// Fast swiping and touching while component is being loaded can cause _camera to be null.
|
||||
if (_camera == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Get the pointer ID
|
||||
Camera.Parameters params = _camera.getParameters();
|
||||
int action = event.getAction();
|
||||
|
||||
Reference in New Issue
Block a user