Browse Source

Fixed random Object null exception error in RPCClient.DoLoad()

Frank van den Bos 1 year ago
parent
commit
0992bcbc51
1 changed files with 1 additions and 1 deletions
  1. 1 1
      InABox.Client.RPC/RPCClient.cs

+ 1 - 1
InABox.Client.RPC/RPCClient.cs

@@ -145,7 +145,7 @@ namespace InABox.Rpc
 
         protected override TEntity[] DoLoad(Filter<TEntity>? filter = null, SortOrder<TEntity>? sort = null)
         {
-            return DoQuery(filter, null, sort).ToObjects<TEntity>().ToArray();
+            return DoQuery(filter, null, sort)?.ToObjects<TEntity>().ToArray() ?? new TEntity[] { };
         }