Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiklas Therning <niklas@therning.org>2016-11-07 17:00:05 +0300
committerNiklas Therning <niklas@therning.org>2016-11-07 17:00:05 +0300
commitda894a35277539f9f4cb59e9f981e2e7f55f8caa (patch)
treedebc24f0e7790bfe0250a625a73d8804b08b4afd /mcs/class/System.Runtime.Remoting
parentb6588622bcf426ff340d91f0d94821d2b17570bb (diff)
Fix NRE in Win32 IpcChannel.StopListening() when no server started
This makes the System.Runtime.Remoting test suite fail in various places on Windows due to the TestFixtureTearDown method in BaseCalls throwing an NRE.
Diffstat (limited to 'mcs/class/System.Runtime.Remoting')
-rw-r--r--mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Ipc.Win32/IpcChannel.cs6
1 files changed, 4 insertions, 2 deletions
diff --git a/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Ipc.Win32/IpcChannel.cs b/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Ipc.Win32/IpcChannel.cs
index 883ea72ebe2..599edd8a803 100644
--- a/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Ipc.Win32/IpcChannel.cs
+++ b/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Ipc.Win32/IpcChannel.cs
@@ -115,7 +115,8 @@ namespace System.Runtime.Remoting.Channels.Ipc.Win32
public void StartListening(object data)
{
- serverChannel.StartListening(data);
+ if (serverChannel != null)
+ serverChannel.StartListening(data);
}
public object ChannelData
@@ -128,7 +129,8 @@ namespace System.Runtime.Remoting.Channels.Ipc.Win32
public void StopListening(object data)
{
- serverChannel.StopListening(data);
+ if (serverChannel != null)
+ serverChannel.StopListening(data);
}
public string[] GetUrlsForUri(string objectURI)