diff options
author | Gonzalo Paniagua Javier <gonzalo.mono@gmail.com> | 2003-02-28 11:00:46 +0300 |
---|---|---|
committer | Gonzalo Paniagua Javier <gonzalo.mono@gmail.com> | 2003-02-28 11:00:46 +0300 |
commit | dcc8dfb3af87b1871a2932ef6e958fd49bf2c8f5 (patch) | |
tree | 655b37cc2112c809c64aaf2b1af4149200f50257 /mcs/class/System/System.Net.Sockets | |
parent | d670275678288a195a35a6fb755b3ac5795263a5 (diff) |
2003-02-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* Socket.cs: patch from Elan Feingold <efeingold@mn.rr.com>. Fixes
NullReferenceException when the callback is null.
svn path=/trunk/mcs/; revision=12056
Diffstat (limited to 'mcs/class/System/System.Net.Sockets')
-rw-r--r-- | mcs/class/System/System.Net.Sockets/ChangeLog | 5 | ||||
-rw-r--r-- | mcs/class/System/System.Net.Sockets/Socket.cs | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/mcs/class/System/System.Net.Sockets/ChangeLog b/mcs/class/System/System.Net.Sockets/ChangeLog index 87cd38da5d2..b9b6fe40acf 100644 --- a/mcs/class/System/System.Net.Sockets/ChangeLog +++ b/mcs/class/System/System.Net.Sockets/ChangeLog @@ -1,3 +1,8 @@ +2003-02-28 Gonzalo Paniagua Javier <gonzalo@ximian.com> + + * Socket.cs: patch from Elan Feingold <efeingold@mn.rr.com>. Fixes + NullReferenceException when the callback is null. + 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com> * NetworkStream.cs: allow 0 size array in Write. diff --git a/mcs/class/System/System.Net.Sockets/Socket.cs b/mcs/class/System/System.Net.Sockets/Socket.cs index f430be427ac..c7a6bb22591 100644 --- a/mcs/class/System/System.Net.Sockets/Socket.cs +++ b/mcs/class/System/System.Net.Sockets/Socket.cs @@ -134,7 +134,8 @@ namespace System.Net.Sockets private void End() { ((ManualResetEvent)result.AsyncWaitHandle).Set(); result.IsCompleted=true; - callback(result); + if (callback != null) + callback(result); } public void Accept() { |