Skip to content

Commit

Permalink
Merge pull request #3903 from ntherning/fix-NRE-in-Win32-IpcChannel.S…
Browse files Browse the repository at this point in the history
…topListening-when-no-server-started

Fix NRE in Win32 IpcChannel.StopListening() when no server started
  • Loading branch information
ntherning committed Nov 7, 2016
2 parents 0176864 + da894a3 commit 9f9d6ca
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ public string Parse(string url, out string objectURI)

public void StartListening(object data)
{
serverChannel.StartListening(data);
if (serverChannel != null)
serverChannel.StartListening(data);
}

public object ChannelData
Expand All @@ -128,7 +129,8 @@ public object ChannelData

public void StopListening(object data)
{
serverChannel.StopListening(data);
if (serverChannel != null)
serverChannel.StopListening(data);
}

public string[] GetUrlsForUri(string objectURI)
Expand Down

0 comments on commit 9f9d6ca

Please sign in to comment.