diff --git a/Wox.Plugin.SystemPlugins/BaseSystemPlugin.cs b/Wox.Plugin.SystemPlugins/BaseSystemPlugin.cs index 9e95d28c05..eea1194798 100644 --- a/Wox.Plugin.SystemPlugins/BaseSystemPlugin.cs +++ b/Wox.Plugin.SystemPlugins/BaseSystemPlugin.cs @@ -19,6 +19,7 @@ namespace Wox.Plugin.SystemPlugins { get { + if (string.IsNullOrEmpty(IcoPath)) return string.Empty; if (IcoPath.StartsWith("data:")) { return IcoPath; diff --git a/Wox.Plugin/PluginMetadata.cs b/Wox.Plugin/PluginMetadata.cs index 9a566ecfbf..a2c54ce7fb 100644 --- a/Wox.Plugin/PluginMetadata.cs +++ b/Wox.Plugin/PluginMetadata.cs @@ -45,6 +45,8 @@ namespace Wox.Plugin { get { + if (string.IsNullOrEmpty(IcoPath)) return string.Empty; + if (IcoPath.StartsWith("data:")) { return IcoPath; diff --git a/Wox.Plugin/Result.cs b/Wox.Plugin/Result.cs index 310f00b3f6..3a7904b2e9 100644 --- a/Wox.Plugin/Result.cs +++ b/Wox.Plugin/Result.cs @@ -14,6 +14,7 @@ namespace Wox.Plugin { { get { + if (string.IsNullOrEmpty(IcoPath)) return string.Empty; if (IcoPath.StartsWith("data:")) { return IcoPath; diff --git a/Wox/SettingWindow.xaml.cs b/Wox/SettingWindow.xaml.cs index 6941d3e6e6..0ac7f97200 100644 --- a/Wox/SettingWindow.xaml.cs +++ b/Wox/SettingWindow.xaml.cs @@ -414,8 +414,7 @@ namespace Wox pluginAuthor.Text = "By: " + pair.Metadata.Author; pluginSubTitle.Text = pair.Metadata.Description; pluginId = pair.Metadata.ID; - SyntaxSugars.CallOrRescueDefault( - () => pluginIcon.Source = ImageLoader.Load(pair.Metadata.FullIcoPath)); + pluginIcon.Source = ImageLoader.Load(pair.Metadata.FullIcoPath); } else { @@ -432,7 +431,7 @@ namespace Wox tbOpenPluginDirecoty.Visibility = Visibility.Collapsed; pluginActionKeywordTitle.Visibility = Visibility.Collapsed; pluginTitle.Cursor = Cursors.Arrow; - SyntaxSugars.CallOrRescueDefault(() => pluginIcon.Source = ImageLoader.Load(sys.FullIcoPath)); + pluginIcon.Source = ImageLoader.Load(sys.FullIcoPath); } }