aboutsummaryrefslogtreecommitdiffstats
path: root/WireGuard/WireGuard
diff options
context:
space:
mode:
authorRoopesh Chander <roop@roopc.net>2019-01-22 04:54:32 +0530
committerRoopesh Chander <roop@roopc.net>2019-01-22 05:00:39 +0530
commitd37e230ee08c52aa04e294e6f122a13b488a174f (patch)
treebaf2ca88e034e990e3543f2602ffd28f34bdd9af /WireGuard/WireGuard
parentmacOS: StatusMenu: Remove unused menu title (diff)
downloadwireguard-apple-d37e230ee08c52aa04e294e6f122a13b488a174f.tar.xz
wireguard-apple-d37e230ee08c52aa04e294e6f122a13b488a174f.zip
macOS: Fix crash when importing using NoTunnelsDetailVC's button
Signed-off-by: Roopesh Chander <roop@roopc.net>
Diffstat (limited to 'WireGuard/WireGuard')
-rw-r--r--WireGuard/WireGuard/UI/macOS/ViewController/NoTunnelsDetailViewController.swift3
1 files changed, 2 insertions, 1 deletions
diff --git a/WireGuard/WireGuard/UI/macOS/ViewController/NoTunnelsDetailViewController.swift b/WireGuard/WireGuard/UI/macOS/ViewController/NoTunnelsDetailViewController.swift
index 38bef87..49f6197 100644
--- a/WireGuard/WireGuard/UI/macOS/ViewController/NoTunnelsDetailViewController.swift
+++ b/WireGuard/WireGuard/UI/macOS/ViewController/NoTunnelsDetailViewController.swift
@@ -40,6 +40,7 @@ class NoTunnelsDetailViewController: NSViewController {
}
@objc func importTunnelClicked() {
- ImportPanelPresenter.presentImportPanel(tunnelsManager: tunnelsManager, sourceVC: self)
+ // We pass sourceVC as parent instead of self because this VC will not be visible when the import completes
+ ImportPanelPresenter.presentImportPanel(tunnelsManager: tunnelsManager, sourceVC: parent)
}
}