From 196daccddec34e0c2dcf0a453f1dce6353e89daa Mon Sep 17 00:00:00 2001 From: Roopesh Chander Date: Thu, 1 Nov 2018 18:59:14 +0530 Subject: [PATCH] QR code: Fix what happens when an error is shown Signed-off-by: Roopesh Chander --- WireGuard/WireGuard/UI/iOS/QRScanViewController.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WireGuard/WireGuard/UI/iOS/QRScanViewController.swift b/WireGuard/WireGuard/UI/iOS/QRScanViewController.swift index ec397f6..99af984 100644 --- a/WireGuard/WireGuard/UI/iOS/QRScanViewController.swift +++ b/WireGuard/WireGuard/UI/iOS/QRScanViewController.swift @@ -131,7 +131,7 @@ class QRScanViewController: UIViewController { func scanDidEncounterError(title: String, message: String) { let alertController = UIAlertController(title: title, message: message, preferredStyle: .alert) alertController.addAction(UIAlertAction(title: "OK", style: .default, handler: { [weak self] _ in - self?.navigationController?.popViewController(animated: true) + self?.dismiss(animated: true, completion: nil) })) present(alertController, animated: true) captureSession = nil