fixed crash for dead game mode folder

This commit is contained in:
iAmAsval 2021-01-14 16:59:38 +01:00
parent ed63dc9d07
commit 70901c9078

View File

@ -1,4 +1,4 @@
using FModel.Creator.Bases;
using FModel.Creator.Bases;
using FModel.Creator.Texts;
using FModel.Utils;
using SkiaSharp;
@ -181,7 +181,7 @@ namespace FModel.Creator.Stats
Color = new SKColor(0, 0, 50, 75)
});
c.DrawBitmap(stat.Icon.Resize(iconSize, iconSize), new SKPoint(icon.Margin * (int)2.5, y + 4), new SKPaint { FilterQuality = SKFilterQuality.High, IsAntialias = true });
if (stat.Icon != null) c.DrawBitmap(stat.Icon.Resize(iconSize, iconSize), new SKPoint(icon.Margin * (int)2.5, y + 4), new SKPaint { FilterQuality = SKFilterQuality.High, IsAntialias = true });
var statPaint = new SKPaint
{