The Free Software Media System - Server Backend & API
Add null check for ImageTags
crobibero4e2d029b3df0
diff --git a/Emby.Server.Implementations/Dto/DtoService.cs b/Emby.Server.Implementations/Dto/DtoService.csindex 8a901516c0..e3ab0d6eab 100644--- a/Emby.Server.Implementations/Dto/DtoService.cs+++ b/Emby.Server.Implementations/Dto/DtoService.cs@@ -1157,7 +1157,7 @@ namespace Emby.Server.Implementations.Dtoif (episodeSeries != null){dto.SeriesPrimaryImageTag = GetTagAndFillBlurhash(dto, episodeSeries, ImageType.Primary);- if (!dto.ImageTags.ContainsKey(ImageType.Primary))+ if (dto.ImageTags == null || !dto.ImageTags.ContainsKey(ImageType.Primary)){AttachPrimaryImageAspectRatio(dto, episodeSeries);}@@ -1207,7 +1207,7 @@ namespace Emby.Server.Implementations.Dtoif (series != null){dto.SeriesPrimaryImageTag = GetTagAndFillBlurhash(dto, series, ImageType.Primary);- if (!dto.ImageTags.ContainsKey(ImageType.Primary))+ if (dto.ImageTags == null || !dto.ImageTags.ContainsKey(ImageType.Primary)){AttachPrimaryImageAspectRatio(dto, series);}