diff options
| author | BaronGreenback <jimcartlidge@yahoo.co.uk> | 2020-12-22 16:14:06 +0000 |
|---|---|---|
| committer | BaronGreenback <jimcartlidge@yahoo.co.uk> | 2020-12-22 16:14:06 +0000 |
| commit | e113a5059794b84090ff3dfb37f52b28ce7651f0 (patch) | |
| tree | 3ffd0380d1d12a455e995f45f1c34893cb70663d /Jellyfin.Api/Controllers/SystemController.cs | |
| parent | 21d2e9ff0cc0933484b2a7768d7a36446b36616a (diff) | |
Possible null reference fix.
Diffstat (limited to 'Jellyfin.Api/Controllers/SystemController.cs')
| -rw-r--r-- | Jellyfin.Api/Controllers/SystemController.cs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Jellyfin.Api/Controllers/SystemController.cs b/Jellyfin.Api/Controllers/SystemController.cs index 7784e8a11..d79bea985 100644 --- a/Jellyfin.Api/Controllers/SystemController.cs +++ b/Jellyfin.Api/Controllers/SystemController.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.IO; using System.Linq; +using System.Net; using System.Net.Mime; using System.Threading; using System.Threading.Tasks; @@ -66,7 +67,7 @@ namespace Jellyfin.Api.Controllers [ProducesResponseType(StatusCodes.Status200OK)] public ActionResult<SystemInfo> GetSystemInfo() { - return _appHost.GetSystemInfo(Request.HttpContext.Connection.RemoteIpAddress); + return _appHost.GetSystemInfo(Request.HttpContext.Connection.RemoteIpAddress ?? IPAddress.Loopback); } /// <summary> @@ -78,7 +79,7 @@ namespace Jellyfin.Api.Controllers [ProducesResponseType(StatusCodes.Status200OK)] public ActionResult<PublicSystemInfo> GetPublicSystemInfo() { - return _appHost.GetPublicSystemInfo(Request.HttpContext.Connection.RemoteIpAddress); + return _appHost.GetPublicSystemInfo(Request.HttpContext.Connection.RemoteIpAddress ?? IPAddress.Loopback); } /// <summary> |
