fix: crash when open external tool drop down menu

This commit is contained in:
leo 2024-04-06 15:01:07 +08:00
parent 111bf2966a
commit d873f21b6a
5 changed files with 12 additions and 13 deletions

View file

@ -303,7 +303,7 @@ namespace SourceGit.ViewModels
foreach (var editor in editors)
{
var dupEditor = editor;
var icon = AssetLoader.Open(dupEditor.Icon);
var icon = AssetLoader.Open(new Uri($"avares://SourceGit/Resources/ExternalToolIcons/{dupEditor.Icon}", UriKind.RelativeOrAbsolute));
var item = new MenuItem();
item.Header = App.Text("Repository.OpenIn", dupEditor.Name);
item.Icon = new Image { Width = 16, Height = 16, Source = new Bitmap(icon) };