diff options
author | 2019-01-21 23:21:47 +0100 | |
---|---|---|
committer | 2019-01-21 23:21:47 +0100 | |
commit | e2b068af1a67a6d352138c2e397b347e13a84cc3 (patch) | |
tree | e67ed260d941a425284f5603bb30cc2a0b92aa35 /WireGuard/WireGuard/UI | |
parent | XCode: set default signing identity back (diff) | |
download | wireguard-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.swift | 8 |
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 78c2bcc..7a6a4a0 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) } } } |