From d9c938ab73cef3e8e4a73e301e3dbe5953004074 Mon Sep 17 00:00:00 2001 From: Leroy Staines <61898562+LeroyStaines@users.noreply.github.com> Date: Wed, 2 Feb 2022 23:35:20 +1300 Subject: [PATCH] Bug fix: Torch wasn't working null check of out parameter "err" should be if(err == null) rather than != null. Otherwise device.TorchMode is generally unreachable. --- ZXing.Net.Mobile/iOS/ZXingScannerView.ios.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ZXing.Net.Mobile/iOS/ZXingScannerView.ios.cs b/ZXing.Net.Mobile/iOS/ZXingScannerView.ios.cs index 406cd0b4c..ff090205b 100644 --- a/ZXing.Net.Mobile/iOS/ZXingScannerView.ios.cs +++ b/ZXing.Net.Mobile/iOS/ZXingScannerView.ios.cs @@ -620,7 +620,7 @@ public void Torch(bool on) { device.LockForConfiguration(out var err); - if (err != null) + if (err == null) { if (on) {