Skip to content

Commit

Permalink
Added check to avoid adding a null font
Browse files Browse the repository at this point in the history
- found and fix provided by @CSerX
- fixes #528
  • Loading branch information
mrbean-bremen committed Jul 31, 2019
1 parent dcb7951 commit 9d052be
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Source/SvgFontManager.cs
Expand Up @@ -53,7 +53,8 @@ public static FontFamily FindFont(string name)
if (SystemFonts.TryGetValue(name.ToLower(), out ff)) return ff;
if (FontLoaderCallback == null) return null;
var ff2 = FontLoaderCallback(name);
SystemFonts.Add(name.ToLower(), ff2);
if (ff2 != null)
SystemFonts.Add(name.ToLower(), ff2);
return ff2;
}
}
Expand Down

0 comments on commit 9d052be

Please sign in to comment.