diff --git a/Flow.Launcher/ViewModel/ResultViewModel.cs b/Flow.Launcher/ViewModel/ResultViewModel.cs index c8664dc36..3eba63b22 100644 --- a/Flow.Launcher/ViewModel/ResultViewModel.cs +++ b/Flow.Launcher/ViewModel/ResultViewModel.cs @@ -68,17 +68,20 @@ namespace Flow.Launcher.ViewModel OnPropertyChanged(nameof(Image)); }); - if (Result.Glyph.FontFamily.Contains('/')) + if (Result.Glyph is { FontFamily: not null } glyph) { - var fontPath = Result.Glyph.FontFamily; - Glyph = Path.IsPathRooted(fontPath) ? Result.Glyph : Result.Glyph with + if (glyph.FontFamily.Contains('/')) { - FontFamily = Path.Combine(Result.PluginDirectory, fontPath) - }; - } - else - { - Glyph = Result.Glyph; + var fontPath = Result.Glyph.FontFamily; + Glyph = Path.IsPathRooted(fontPath) ? Result.Glyph : Result.Glyph with + { + FontFamily = Path.Combine(Result.PluginDirectory, fontPath) + }; + } + else + { + Glyph = glyph; + } } }