aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/Devices/DeviceManager.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Server.Implementations/Devices/DeviceManager.cs')
-rw-r--r--MediaBrowser.Server.Implementations/Devices/DeviceManager.cs6
1 files changed, 6 insertions, 0 deletions
diff --git a/MediaBrowser.Server.Implementations/Devices/DeviceManager.cs b/MediaBrowser.Server.Implementations/Devices/DeviceManager.cs
index b65b7d11b..fb64a6d28 100644
--- a/MediaBrowser.Server.Implementations/Devices/DeviceManager.cs
+++ b/MediaBrowser.Server.Implementations/Devices/DeviceManager.cs
@@ -233,6 +233,12 @@ namespace MediaBrowser.Server.Implementations.Devices
}
var user = _userManager.GetUserById(userId);
+
+ if (user == null)
+ {
+ throw new ArgumentException("user not found");
+ }
+
if (!CanAccessDevice(user.Policy, deviceId))
{
var capabilities = GetCapabilities(deviceId);