mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-22 16:54:46 +03:00
add null checks on session & device creation
This commit is contained in:
@@ -51,6 +51,11 @@ namespace MediaBrowser.Server.Implementations.Devices
|
||||
|
||||
public async Task<DeviceInfo> RegisterDevice(string reportedId, string name, string appName, string appVersion, string usedByUserId)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(reportedId))
|
||||
{
|
||||
throw new ArgumentNullException("reportedId");
|
||||
}
|
||||
|
||||
var device = GetDevice(reportedId) ?? new DeviceInfo
|
||||
{
|
||||
Id = reportedId
|
||||
|
||||
Reference in New Issue
Block a user