Don't process bad images

This commit is contained in:
LarsBrubaker 2020-08-30 16:33:29 -07:00
parent c7a5f65d42
commit dc327e7e95
2 changed files with 10 additions and 3 deletions

View file

@ -201,6 +201,11 @@ namespace MatterHackers.MatterControl.Library
{
if (icon != null)
{
if (icon.Width == 0)
{
return;
}
icon = await Task.Run(() => this.EnsureCorrectThumbnailSizing(icon, thumbWidth, thumbHeight));
thumbnailListener?.Invoke(icon);
}