diff --git a/Mac/Preferences/General/GeneralPrefencesViewController.swift b/Mac/Preferences/General/GeneralPrefencesViewController.swift index 1ecfb3ff3..9d4b0c20b 100644 --- a/Mac/Preferences/General/GeneralPrefencesViewController.swift +++ b/Mac/Preferences/General/GeneralPrefencesViewController.swift @@ -202,10 +202,12 @@ private extension GeneralPreferencesViewController { menu.addItem(NSMenuItem.separator()) for browser in allBrowsers { - let item = NSMenuItem(title: browser.name!, action: nil, keyEquivalent: "") + guard let name = browser.name else { continue } + + let item = NSMenuItem(title: name, action: nil, keyEquivalent: "") item.representedObject = browser.bundleIdentifier - let icon = browser.icon! + let icon = browser.icon ?? NSWorkspace.shared.icon(forFileType: kUTTypeApplicationBundle as String) icon.size = NSSize(width: 16.0, height: 16.0) item.image = browser.icon menu.addItem(item)