aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShadowghost <Ghost_of_Stone@web.de>2023-02-20 21:58:31 +0100
committerShadowghost <Ghost_of_Stone@web.de>2023-02-20 21:58:35 +0100
commit6300d01fcceba56932741251443f5b2aa4f76de2 (patch)
tree97e4b8ce4a6c6da4fb3eebafdad1fbff6a7f16a1
parent5f938de337537ac1e03633c82d2a27a34808d9d0 (diff)
Apply review suggestion
-rw-r--r--Emby.Server.Implementations/Data/SqliteItemRepository.cs8
1 files changed, 6 insertions, 2 deletions
diff --git a/Emby.Server.Implementations/Data/SqliteItemRepository.cs b/Emby.Server.Implementations/Data/SqliteItemRepository.cs
index ecc2a2c91..0aa943270 100644
--- a/Emby.Server.Implementations/Data/SqliteItemRepository.cs
+++ b/Emby.Server.Implementations/Data/SqliteItemRepository.cs
@@ -3623,8 +3623,12 @@ namespace Emby.Server.Implementations.Data
clauseBuilder.Append("(guid in (select itemid from People where Name = (select Name from TypedBaseItems where guid=")
.Append(paramName)
.Append("))) OR ");
- query.PersonIds[i].TryWriteBytes(idBytes);
- statement?.TryBind(paramName, idBytes);
+
+ if (statement is not null)
+ {
+ query.PersonIds[i].TryWriteBytes(idBytes);
+ statement.TryBind(paramName, idBytes);
+ }
}
// Remove last " OR "