macos: titlebar tabs should do nothing if no titlebar

Fixes #1876
This commit is contained in:
Mitchell Hashimoto
2024-06-25 10:03:05 -07:00
parent 7771d137c6
commit c9c1bd0531

View File

@ -194,7 +194,9 @@ class TerminalWindow: NSWindow {
newTabButtonImageLayer = nil
effectViewIsHidden = false
if titlebarTabs {
// We can only update titlebar tabs if there is a titlebar. Without the
// styleMask check the app will crash (issue #1876)
if titlebarTabs && styleMask.contains(.titled) {
guard let tabBarAccessoryViewController = titlebarAccessoryViewControllers.first(where: { $0.identifier == Self.TabBarController}) else { return }
tabBarAccessoryViewController.layoutAttribute = .right