aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Services/ServiceHandler.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Emby.Server.Implementations/Services/ServiceHandler.cs')
-rw-r--r--Emby.Server.Implementations/Services/ServiceHandler.cs5
1 files changed, 4 insertions, 1 deletions
diff --git a/Emby.Server.Implementations/Services/ServiceHandler.cs b/Emby.Server.Implementations/Services/ServiceHandler.cs
index 621be4fcb..d32fce1c7 100644
--- a/Emby.Server.Implementations/Services/ServiceHandler.cs
+++ b/Emby.Server.Implementations/Services/ServiceHandler.cs
@@ -26,7 +26,10 @@ namespace Emby.Server.Implementations.Services
if (!string.IsNullOrEmpty(contentType) && httpReq.ContentLength > 0)
{
var deserializer = RequestHelper.GetRequestReader(host, contentType);
- return deserializer?.Invoke(requestType, httpReq.InputStream);
+ if (deserializer != null)
+ {
+ return deserializer.Invoke(requestType, httpReq.InputStream);
+ }
}
return Task.FromResult(host.CreateInstance(requestType));