Showing
1 changed file
with
2 additions
and
0 deletions
| @@ -276,6 +276,7 @@ public class MobileScannerPlugin: NSObject, FlutterPlugin, FlutterStreamHandler, | @@ -276,6 +276,7 @@ public class MobileScannerPlugin: NSObject, FlutterPlugin, FlutterStreamHandler, | ||
| 276 | device.unlockForConfiguration() | 276 | device.unlockForConfiguration() |
| 277 | } catch { | 277 | } catch { |
| 278 | result(FlutterError(code: error.localizedDescription, message: nil, details: nil)) | 278 | result(FlutterError(code: error.localizedDescription, message: nil, details: nil)) |
| 279 | + return | ||
| 279 | } | 280 | } |
| 280 | } | 281 | } |
| 281 | 282 | ||
| @@ -288,6 +289,7 @@ public class MobileScannerPlugin: NSObject, FlutterPlugin, FlutterStreamHandler, | @@ -288,6 +289,7 @@ public class MobileScannerPlugin: NSObject, FlutterPlugin, FlutterStreamHandler, | ||
| 288 | captureSession.addInput(input) | 289 | captureSession.addInput(input) |
| 289 | } catch { | 290 | } catch { |
| 290 | result(FlutterError(code: error.localizedDescription, message: nil, details: nil)) | 291 | result(FlutterError(code: error.localizedDescription, message: nil, details: nil)) |
| 292 | + return | ||
| 291 | } | 293 | } |
| 292 | captureSession.sessionPreset = AVCaptureSession.Preset.photo | 294 | captureSession.sessionPreset = AVCaptureSession.Preset.photo |
| 293 | // Add video output. | 295 | // Add video output. |
-
Please register or login to post a comment