mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 11:16:51 +02:00
Fix potential issues in control panel.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user