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
This commit is contained in:
Jan Češpivo
2025-09-19 15:17:35 +00:00
committed by GitHub
parent 154b01c5fe
commit 0f4bdca9e9
+1 -1
View File
@@ -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(),