From a0b24f53b5c740de2ed3ade26f417e4139464993 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 --- 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