diff --git a/Server/Services/DataService.cs b/Server/Services/DataService.cs index 578dc121..a68f2b73 100644 --- a/Server/Services/DataService.cs +++ b/Server/Services/DataService.cs @@ -2091,6 +2091,11 @@ namespace Remotely.Server.Services .ThenInclude(x => x.Users) .FirstOrDefault(x => x.ID == deviceID); + if (device is null) + { + return Array.Empty(); + } + var orgUsers = dbContext.Users .Where(user => user.OrganizationID == device.OrganizationID &&