diff options
| author | crobibero <cody@robibe.ro> | 2021-01-25 08:48:24 -0700 |
|---|---|---|
| committer | crobibero <cody@robibe.ro> | 2021-01-25 08:48:24 -0700 |
| commit | 4e2d029b3df0e5c77adc7c7fee25f76d209c7946 (patch) | |
| tree | f8c2ddb843d60aa823cd86d94ca227e2b227b166 | |
| parent | e5828cdbf179181f7f891f79637da8819db6de12 (diff) | |
Add null check for ImageTags
| -rw-r--r-- | Emby.Server.Implementations/Dto/DtoService.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Emby.Server.Implementations/Dto/DtoService.cs b/Emby.Server.Implementations/Dto/DtoService.cs index 8a901516c..e3ab0d6ea 100644 --- a/Emby.Server.Implementations/Dto/DtoService.cs +++ b/Emby.Server.Implementations/Dto/DtoService.cs @@ -1157,7 +1157,7 @@ namespace Emby.Server.Implementations.Dto if (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.Dto if (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); } |
