aboutsummaryrefslogtreecommitdiffstats
path: root/WireGuard/WireGuard/UI
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-01-21 23:21:47 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2019-01-21 23:21:47 +0100
commite2b068af1a67a6d352138c2e397b347e13a84cc3 (patch)
treee67ed260d941a425284f5603bb30cc2a0b92aa35 /WireGuard/WireGuard/UI
parentXCode: set default signing identity back (diff)
downloadwireguard-apple-e2b068af1a67a6d352138c2e397b347e13a84cc3.tar.xz
wireguard-apple-e2b068af1a67a6d352138c2e397b347e13a84cc3.zip
macOS: Tunnel edit: actually clean up error handling
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'WireGuard/WireGuard/UI')
-rw-r--r--WireGuard/WireGuard/UI/macOS/ViewController/TunnelEditViewController.swift8
1 files changed, 4 insertions, 4 deletions
diff --git a/WireGuard/WireGuard/UI/macOS/ViewController/TunnelEditViewController.swift b/WireGuard/WireGuard/UI/macOS/ViewController/TunnelEditViewController.swift
index 78c2bcc2..7a6a4a06 100644
--- a/WireGuard/WireGuard/UI/macOS/ViewController/TunnelEditViewController.swift
+++ b/WireGuard/WireGuard/UI/macOS/ViewController/TunnelEditViewController.swift
@@ -218,11 +218,11 @@ class TunnelEditViewController: NSViewController {
tunnelsManager.add(tunnelConfiguration: tunnelConfiguration, activateOnDemandSetting: onDemandSetting) { [weak self] result in
if let error = result.error {
ErrorPresenter.showErrorAlert(error: error, from: self)
- } else {
- let tunnel: TunnelContainer = result.value!
- self?.dismiss(self)
- self?.delegate?.tunnelSaved(tunnel: tunnel)
+ return
}
+ let tunnel: TunnelContainer = result.value!
+ self?.dismiss(self)
+ self?.delegate?.tunnelSaved(tunnel: tunnel)
}
}
}