1
0
mirror of https://github.com/fadden/6502bench.git synced 2024-10-31 19:04:44 +00:00

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

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;