Fix potential issues in control panel.

This commit is contained in:
qianlifeng
2014-07-19 08:15:51 +08:00
parent 6d8244ba5c
commit f1697313c0
3 changed files with 15 additions and 5 deletions

View File

@@ -51,7 +51,7 @@ namespace Wox.Plugin.SystemPlugins.ControlPanel
foreach (ControlPanelItem item in controlPanelItems)
{
if (!File.Exists(iconFolder + item.LocalizedString + fileType))
if (!File.Exists(iconFolder + item.LocalizedString + fileType) && item.Icon != null)
{
item.Icon.ToBitmap().Save(iconFolder + item.LocalizedString + fileType);
}
@@ -101,7 +101,7 @@ namespace Wox.Plugin.SystemPlugins.ControlPanel
if (item.InfoTip != null && (item.Score = matcher.Evaluate(item.InfoTip).Score) > 0) return true;
if (item.LocalizedString != null && (item.Score = matcher.Evaluate(item.LocalizedString.Unidecode()).Score) > 0) return true;
return false;
}
}