fix: rare crash when being started twice quickly at login

This commit is contained in:
Louis Pontoise authored and lwouis committed 2020-08-04 23:42:28 +09:00
1 parent 6444732bc5
commit a6365fb9a0
1 file changed
+4 -2
+4 -2
View File
@@ -160,8 +160,10 @@ class App: AppCenterApplication, NSApplicationDelegate {
}
@objc func showPreferencesPanel() {
Screen.repositionPanel(preferencesWindowController.window!, Screen.preferred(), .appleCentered)
preferencesWindowController.show()
if let preferencesWindow = preferencesWindowController.window {
Screen.repositionPanel(preferencesWindow, Screen.preferred(), .appleCentered)
preferencesWindowController.show()
}
}
@objc func showFeedbackPanel() {