1
1
mirror of https://github.com/qvacua/vimr.git synced 2024-11-28 11:35:35 +03:00

GH-376 Re-set NSWindow's delegate just before closing

- When exiting full screen, often, some delegate methods of NSWindow get called after deallocation. This is just a quick-and-dirty fix.
This commit is contained in:
Tae Won Ha 2017-01-03 15:40:58 +01:00
parent 612882bfd9
commit b6c9624875
No known key found for this signature in database
GPG Key ID: E40743465B5B8B44

View File

@ -527,6 +527,11 @@ extension MainWindowComponent {
isToolButtonsVisible: self.workspace.isToolButtonsVisible,
toolPrefDatas: self.toolPrefDatas())
// When exiting full screen, often, some delegate methods of NSWindow get called after deallocation. This is just
// a quick-and-dirty fix.
// TODO: fix it for real...
self.windowController.window?.delegate = nil
self.publish(event: MainWindowAction.close(mainWindow: self, mainWindowPrefData: prefData))
}