The Free Software Media System - Server Backend & API
Fix null reference when request content type is application/x-www-form-urlencoded
bugfixin08d3a5d2feaf
diff --git a/Emby.Server.Implementations/Services/ServiceHandler.cs b/Emby.Server.Implementations/Services/ServiceHandler.csindex 621be4fcb5..d32fce1c77 100644--- a/Emby.Server.Implementations/Services/ServiceHandler.cs+++ b/Emby.Server.Implementations/Services/ServiceHandler.cs@@ -26,7 +26,10 @@ namespace Emby.Server.Implementations.Servicesif (!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));