aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBaronGreenback <jimcartlidge@yahoo.co.uk>2021-03-10 19:27:22 +0000
committerBaronGreenback <jimcartlidge@yahoo.co.uk>2021-03-10 19:27:22 +0000
commiteafb8cf6525abe6a1031cd2b7a9d028a3c078053 (patch)
tree874f80cd29f432a8c805c9de5fc0ddb9f50aac41
parent5592967497b4808330eea010981810181489d41d (diff)
Null Pointer fix
-rw-r--r--RSSDP/SsdpDeviceLocator.cs10
1 files changed, 5 insertions, 5 deletions
diff --git a/RSSDP/SsdpDeviceLocator.cs b/RSSDP/SsdpDeviceLocator.cs
index 0cdc5ce3d..e2b524cf4 100644
--- a/RSSDP/SsdpDeviceLocator.cs
+++ b/RSSDP/SsdpDeviceLocator.cs
@@ -27,14 +27,14 @@ namespace Rssdp.Infrastructure
/// </summary>
public SsdpDeviceLocator(ISsdpCommunicationsServer communicationsServer)
{
- if (communicationsServer == null)
+ _CommunicationsServer = communicationsServer;
+
+ if (communicationsServer != null)
{
- throw new ArgumentNullException(nameof(communicationsServer));
+ // This can occur is dlna is enabled, but defined to run over https.
+ _CommunicationsServer.ResponseReceived += CommsServer_ResponseReceived;
}
- _CommunicationsServer = communicationsServer;
- _CommunicationsServer.ResponseReceived += CommsServer_ResponseReceived;
-
_Devices = new List<DiscoveredSsdpDevice>();
}