diff options
Diffstat (limited to 'WireGuard/WireGuard/UI/macOS/ViewController/LogViewController.swift')
-rw-r--r-- | WireGuard/WireGuard/UI/macOS/ViewController/LogViewController.swift | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/WireGuard/WireGuard/UI/macOS/ViewController/LogViewController.swift b/WireGuard/WireGuard/UI/macOS/ViewController/LogViewController.swift index 8146977..088d161 100644 --- a/WireGuard/WireGuard/UI/macOS/ViewController/LogViewController.swift +++ b/WireGuard/WireGuard/UI/macOS/ViewController/LogViewController.swift @@ -220,7 +220,8 @@ class LogViewController: NSViewController { return } DispatchQueue.main.async { [weak self] in - self?.dismiss(self) + guard let self = self else { return } + self.presentingViewController?.dismiss(self) } } @@ -228,7 +229,7 @@ class LogViewController: NSViewController { } @objc func closeClicked() { - dismiss(self) + presentingViewController?.dismiss(self) } @objc func copy(_ sender: Any?) { |