diff --git a/src/Camera.tsx b/src/Camera.tsx index 1db4d15..9c1e938 100644 --- a/src/Camera.tsx +++ b/src/Camera.tsx @@ -343,9 +343,11 @@ export class Camera extends React.PureComponent { * @internal */ componentWillUnmount(): void { - this.assertFrameProcessorsEnabled(); - // @ts-expect-error JSI functions aren't typed - global.unsetFrameProcessor(this.handle); + if (this.lastFrameProcessor != null || this.props.frameProcessor != null) { + this.assertFrameProcessorsEnabled(); + // @ts-expect-error JSI functions aren't typed + global.unsetFrameProcessor(this.handle); + } } /**