Skip to content

Commit

Permalink
Merge pull request #115 from kubaflo/main
Browse files Browse the repository at this point in the history
Fixed app crash on iOS simulators
  • Loading branch information
Redth committed Oct 23, 2023
2 parents bc10aa7 + 4146845 commit bb6912b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ZXing.Net.MAUI/Apple/CameraManager.ios.maccatalyst.cs
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,9 @@ public void UpdateCamera()
if (captureDevice == null)
captureDevice = AVCaptureDevice.GetDefaultDevice(AVMediaTypes.Video);

if (captureDevice is null)
return;

captureInput = new AVCaptureDeviceInput(captureDevice, out var err);

captureSession.AddInput(captureInput);
Expand Down

0 comments on commit bb6912b

Please sign in to comment.