From 0f4bdca9e9742bc2acea8b72497e55f3deb4805a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20=C4=8Ce=C5=A1pivo?= Date: Fri, 19 Sep 2025 17:17:35 +0200 Subject: [PATCH] Update icon theme fallback to use default theme (#38485) https://github.com/zed-industries/zed/pull/38367 introduced panic: ``` thread 'main' panicked at crates/theme/src/settings.rs:812:18: called `Option::unwrap()` on a `None` value ``` In this PR I restored fallback logic from the original code - before settings refactor. Release Notes: - N/A --- crates/theme/src/settings.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/theme/src/settings.rs b/crates/theme/src/settings.rs index e8ae1eed3cd7ca49ec946645160b98732be83884..b2c19ae3ed0d6e3dbf622c9e125bad7eeccf0a6e 100644 --- a/crates/theme/src/settings.rs +++ b/crates/theme/src/settings.rs @@ -808,7 +808,7 @@ impl settings::Settings for ThemeSettings { theme_overrides: HashMap::default(), active_icon_theme: themes .get_icon_theme(icon_theme_selection.icon_theme(*system_appearance)) - .ok() + .or_else(|_| themes.default_icon_theme()) .unwrap(), icon_theme_selection: Some(icon_theme_selection), ui_density: content.ui_density.unwrap_or_default().into(),