Merge pull request #4961 from crobibero/person-blurhash-null-ref
Fix potential null reference
This commit is contained in:
commit
a8230c07ea
|
@ -582,9 +582,13 @@ namespace Emby.Server.Implementations.Dto
|
|||
{
|
||||
baseItemPerson.PrimaryImageTag = GetTagAndFillBlurhash(dto, entity, ImageType.Primary);
|
||||
baseItemPerson.Id = entity.Id.ToString("N", CultureInfo.InvariantCulture);
|
||||
if (dto.ImageBlurHashes != null)
|
||||
{
|
||||
// Only add BlurHash for the person's image.
|
||||
baseItemPerson.ImageBlurHashes = new Dictionary<ImageType, Dictionary<string, string>>();
|
||||
foreach (var (imageType, blurHash) in dto.ImageBlurHashes)
|
||||
{
|
||||
if (blurHash != null)
|
||||
{
|
||||
baseItemPerson.ImageBlurHashes[imageType] = new Dictionary<string, string>();
|
||||
foreach (var (imageId, blurHashValue) in blurHash)
|
||||
|
@ -595,6 +599,8 @@ namespace Emby.Server.Implementations.Dto
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
list.Add(baseItemPerson);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user