mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 03:26:07 +02:00
add null check when updating images
This commit is contained in:
parent
acd60f1d85
commit
ce637a2793
1 changed files with 6 additions and 0 deletions
|
@ -4286,6 +4286,12 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
||||||
var index = 0;
|
var index = 0;
|
||||||
foreach (var image in images)
|
foreach (var image in images)
|
||||||
{
|
{
|
||||||
|
if (string.IsNullOrWhiteSpace(image.Path))
|
||||||
|
{
|
||||||
|
// Invalid
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
_saveImagesCommand.GetParameter(0).Value = itemId;
|
_saveImagesCommand.GetParameter(0).Value = itemId;
|
||||||
_saveImagesCommand.GetParameter(1).Value = image.Type;
|
_saveImagesCommand.GetParameter(1).Value = image.Type;
|
||||||
_saveImagesCommand.GetParameter(2).Value = image.Path;
|
_saveImagesCommand.GetParameter(2).Value = image.Path;
|
||||||
|
|
Loading…
Reference in a new issue