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:
authorPhilip Herron <herron.philip@googlemail.com>2016-05-25 16:18:59 +0300
committerPhilip Herron <herron.philip@googlemail.com>2016-05-25 16:18:59 +0300
commit6425014c8ff62c8340875b4bf4821c0d8408e37f (patch)
tree51a8e1fcee0ff560a04f87d0d4b45b623910c205 /mcs/class/System.Net.Http
parentd3f789f3c9f4be9764376f7b8d26a4ba9777ee82 (diff)
ContentStream can be null if no bytes were available and is closed will cause null-exception
Diffstat (limited to 'mcs/class/System.Net.Http')
-rw-r--r--mcs/class/System.Net.Http/CFNetworkHandler.cs4
1 files changed, 3 insertions, 1 deletions
diff --git a/mcs/class/System.Net.Http/CFNetworkHandler.cs b/mcs/class/System.Net.Http/CFNetworkHandler.cs
index 5723acb0b1c..2b9a54d7fdc 100644
--- a/mcs/class/System.Net.Http/CFNetworkHandler.cs
+++ b/mcs/class/System.Net.Http/CFNetworkHandler.cs
@@ -61,7 +61,9 @@ namespace System.Net.Http
public void Close ()
{
CancellationTokenRegistration.Dispose ();
- ContentStream.Close ();
+ if (ContentStream != null) {
+ ContentStream.Close ();
+ }
}
}