mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-13 19:19:23 +08:00
Fixes issue #846 IndexOutOfRangeException when reading empty icon from registry in ControlPanel plugin
This commit is contained in:
parent
a96947c7e7
commit
58c2c84120
@ -230,6 +230,12 @@ namespace Wox.Plugin.ControlPanel
|
||||
if (currentKey.OpenSubKey("DefaultIcon").GetValue(null) != null)
|
||||
{
|
||||
iconString = new List<string>(currentKey.OpenSubKey("DefaultIcon").GetValue(null).ToString().Split(new[] { ',' }, 2));
|
||||
if (string.IsNullOrEmpty(iconString[0]))
|
||||
{
|
||||
// fallback to default icon
|
||||
return null;
|
||||
}
|
||||
|
||||
if (iconString[0][0] == '@')
|
||||
{
|
||||
iconString[0] = iconString[0].Substring(1);
|
||||
|
Loading…
Reference in New Issue
Block a user