aboutsummaryrefslogtreecommitdiffstats
path: root/WireGuard/WireGuard/UI
diff options
context:
space:
mode:
authorRoopesh Chander <roop@roopc.net>2018-12-11 00:30:33 +0530
committerRoopesh Chander <roop@roopc.net>2018-12-11 00:34:22 +0530
commit15b6cf541205d935b6afd483af79078c14a21215 (patch)
tree0a71457f114cb1fcee74b35ab2e8e6d8a7f7bd59 /WireGuard/WireGuard/UI
parentTunnelsManager: Don't act on status change on tunnelProviders we don't have (diff)
downloadwireguard-apple-15b6cf541205d935b6afd483af79078c14a21215.tar.xz
wireguard-apple-15b6cf541205d935b6afd483af79078c14a21215.zip
Error handling: alertText() can be nil
Indicating that no alert is to be shown for that error. Signed-off-by: Roopesh Chander <roop@roopc.net>
Diffstat (limited to 'WireGuard/WireGuard/UI')
-rw-r--r--WireGuard/WireGuard/UI/iOS/ErrorPresenter.swift2
1 files changed, 1 insertions, 1 deletions
diff --git a/WireGuard/WireGuard/UI/iOS/ErrorPresenter.swift b/WireGuard/WireGuard/UI/iOS/ErrorPresenter.swift
index 3c4a1bf..c613d67 100644
--- a/WireGuard/WireGuard/UI/iOS/ErrorPresenter.swift
+++ b/WireGuard/WireGuard/UI/iOS/ErrorPresenter.swift
@@ -8,7 +8,7 @@ class ErrorPresenter {
static func showErrorAlert(error: WireGuardAppError, from sourceVC: UIViewController?,
onDismissal: (() -> Void)? = nil, onPresented: (() -> Void)? = nil) {
guard let sourceVC = sourceVC else { return }
- let (title, message) = error.alertText()
+ guard let (title, message) = error.alertText() else { return }
let okAction = UIAlertAction(title: "OK", style: .default) { (_) in
onDismissal?()
}