Fixed bug in ShellItemImages throwing unnecessary error if unable to generate thumbnail

pull/211/head
dahall 2021-02-04 14:22:56 -07:00
parent 5054e2c6a2
commit 1d9289086b
1 changed files with 2 additions and 2 deletions

View File

@ -40,8 +40,8 @@ namespace Vanara.Windows.Shell
hr = fctry.GetImage(size, (SIIGBF)flags, out hbmp);
if (hr == 0x8004B200 && flags.IsFlagSet(ShellItemGetImageOptions.ThumbnailOnly))
throw new InvalidOperationException("Thumbnails are not supported by this item.");
hr.ThrowIfFailed();
return hbmp;
if (hr.Succeeded)
return hbmp;
}
//hr = LoadImageFromThumbnailProvider(shellItem.IShellItem, ref sz, out hbmp);