Fix crash in font picker

It's possible to have multiple fonts with the same font family.
Don't use the list add method that throws an exception when it
finds a duplicate key.
This commit is contained in:
Andy McFadden 2022-04-29 09:00:01 -07:00
parent 6e52f9986c
commit 0878854759
1 changed files with 1 additions and 1 deletions

View File

@ -90,7 +90,7 @@ namespace SourceGen.WpfGui {
continue;
}
tmpList.Add(familyName, typ.FontFamily);
tmpList[familyName] = typ.FontFamily;
if (familyName.Equals(initialFamily)) {
SelectedFamily = typ.FontFamily;