Selaa lähdekoodia

Apply review suggestion

Shadowghost 2 vuotta sitten
vanhempi
sitoutus
6300d01fcc
1 muutettua tiedostoa jossa 6 lisäystä ja 2 poistoa
  1. 6 2
      Emby.Server.Implementations/Data/SqliteItemRepository.cs

+ 6 - 2
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 "