mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-02-24 04:00:02 +01:00
Merge pull request #917 from meixger/issue846
Fixes issue #846 IndexOutOfRangeException when reading empty icon fro…
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user