Merge pull request #274 from scholtzan/bugfix-document-crash

Bugfix: prevent crashing when opening second document
This commit is contained in:
Anna Scholtz 2018-09-28 13:34:10 -07:00 committed by GitHub
commit 8ffb51aa8f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -77,10 +77,10 @@ class Document: NSDocument {
windowController.window?.minSize = Document.minWinSize
self.editViewController = windowController.contentViewController as? EditViewController
editViewController?.document = self
if let config = (NSApplication.shared.delegate as? AppDelegate)?.configCache {
editViewController?.configChanged(changes: config)
}
editViewController?.document = self
windowController.window?.delegate = editViewController
self.addWindowController(windowController)
}