diff --git a/macos/Sources/Features/Terminal/TerminalWindow.swift b/macos/Sources/Features/Terminal/TerminalWindow.swift index 2d54db321..80abeaca4 100644 --- a/macos/Sources/Features/Terminal/TerminalWindow.swift +++ b/macos/Sources/Features/Terminal/TerminalWindow.swift @@ -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