From 4880bd28c8f5b67de7663853f3b21980d63df779 Mon Sep 17 00:00:00 2001 From: Kristalev Danil Date: Sun, 9 Oct 2022 10:22:50 +0300 Subject: [PATCH] Fix new editor tabs crashes --- .../Sources/Controls/TabbedEditor/EditorTab/EditorTab.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Nimble/Sources/Controls/TabbedEditor/EditorTab/EditorTab.swift b/Nimble/Sources/Controls/TabbedEditor/EditorTab/EditorTab.swift index 0867a813..68ae4b24 100644 --- a/Nimble/Sources/Controls/TabbedEditor/EditorTab/EditorTab.swift +++ b/Nimble/Sources/Controls/TabbedEditor/EditorTab/EditorTab.swift @@ -16,7 +16,7 @@ class EditorTab: NSCollectionViewItem { @IBOutlet private weak var titleLabel: NSTextField! @IBOutlet private weak var backgroundView: NSView! @IBOutlet private weak var tabIconView: NSImageView! - @IBOutlet private weak var separatorView: NSView! + @IBOutlet private weak var separatorView: NSView? override var isSelected: Bool { didSet { @@ -54,7 +54,7 @@ class EditorTab: NSCollectionViewItem { private func updateSelectionHighlighting() { guard isViewLoaded else { return } - separatorView.isHidden = showAsHighlighted + separatorView?.isHidden = showAsHighlighted view.layer?.backgroundColor = showAsHighlighted ? NSColor.selectedControlColor.cgColor : .clear }