diff options
author | Philip Herron <herron.philip@googlemail.com> | 2016-05-25 16:18:59 +0300 |
---|---|---|
committer | Philip Herron <herron.philip@googlemail.com> | 2016-05-25 16:18:59 +0300 |
commit | 6425014c8ff62c8340875b4bf4821c0d8408e37f (patch) | |
tree | 51a8e1fcee0ff560a04f87d0d4b45b623910c205 /mcs/class/System.Net.Http | |
parent | d3f789f3c9f4be9764376f7b8d26a4ba9777ee82 (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.cs | 4 |
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 (); + } } } |