AVCaptureVideoPreviewLayer connection property can be nil
AVCaptureVideoPreviewLayer connection property can be nil

It can be nil if the session is detached which happens when metadataObjectTypes is empty and camera permission is denied

yannickl/QRCodeReader.swift,korgx9/QRCodeReader.swift,korgx9/QRCodeReader.swift,yannickl/QRCodeReader.swift