aboutsummaryrefslogtreecommitdiffstats
path: root/WireGuard/WireGuard/UI/macOS/ImportPanelPresenter.swift
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--WireGuard/WireGuard/UI/macOS/ImportPanelPresenter.swift4
1 files changed, 2 insertions, 2 deletions
diff --git a/WireGuard/WireGuard/UI/macOS/ImportPanelPresenter.swift b/WireGuard/WireGuard/UI/macOS/ImportPanelPresenter.swift
index 03b1be7..95fc46a 100644
--- a/WireGuard/WireGuard/UI/macOS/ImportPanelPresenter.swift
+++ b/WireGuard/WireGuard/UI/macOS/ImportPanelPresenter.swift
@@ -4,8 +4,8 @@
import Cocoa
class ImportPanelPresenter {
- static func presentImportPanel(tunnelsManager: TunnelsManager, sourceVC: NSViewController) {
- guard let window = sourceVC.view.window else { return }
+ static func presentImportPanel(tunnelsManager: TunnelsManager, sourceVC: NSViewController?) {
+ guard let window = sourceVC?.view.window else { return }
let openPanel = NSOpenPanel()
openPanel.prompt = tr("macSheetButtonImport")
openPanel.allowedFileTypes = ["conf", "zip"]