fix: Catch rare componentWillUnmount crash

This commit is contained in:
Marc Rousavy 2021-09-27 14:44:01 +02:00
parent cbaffc20e6
commit 3d098697e9

View File

@ -392,6 +392,7 @@ export class Camera extends React.PureComponent<CameraProps> {
/** @internal */
componentWillUnmount(): void {
if (!this.isNativeViewMounted) return;
if (this.lastFrameProcessor != null || this.props.frameProcessor != null) {
this.unsetFrameProcessor();
this.lastFrameProcessor = undefined;