Author: spouliot
Date: 2008-01-22 07:23:09 -0500 (Tue, 22 Jan 2008)
New Revision: 93517
Modified:
trunk/mcs/class/Mono.Posix/Mono.Unix/ChangeLog
trunk/mcs/class/Mono.Posix/Mono.Unix/UnixPipes.cs
Log:
2008-01-22 Sebastien Pouliot <[EMAIL PROTECTED]>
* UnixPipes.cs: Fix Equals to avoid NRE (and return false if object
is null). Found using Gendarme.
Modified: trunk/mcs/class/Mono.Posix/Mono.Unix/ChangeLog
===================================================================
--- trunk/mcs/class/Mono.Posix/Mono.Unix/ChangeLog 2008-01-22 12:22:24 UTC
(rev 93516)
+++ trunk/mcs/class/Mono.Posix/Mono.Unix/ChangeLog 2008-01-22 12:23:09 UTC
(rev 93517)
@@ -1,3 +1,8 @@
+2008-01-22 Sebastien Pouliot <[EMAIL PROTECTED]>
+
+ * UnixPipes.cs: Fix Equals to avoid NRE (and return false if object
+ is null). Found using Gendarme.
+
2007-12-17 Jonathan Pryor <[EMAIL PROTECTED]>
* UnixEnvironment.cs: Update MachineName property accesor to use
uname(2)
Modified: trunk/mcs/class/Mono.Posix/Mono.Unix/UnixPipes.cs
===================================================================
--- trunk/mcs/class/Mono.Posix/Mono.Unix/UnixPipes.cs 2008-01-22 12:22:24 UTC
(rev 93516)
+++ trunk/mcs/class/Mono.Posix/Mono.Unix/UnixPipes.cs 2008-01-22 12:23:09 UTC
(rev 93517)
@@ -57,7 +57,7 @@
public override bool Equals (object value)
{
- if (value.GetType() != GetType())
+ if ((value == null) || (value.GetType () != GetType ()))
return false;
UnixPipes other = (UnixPipes) value;
return Reading.Handle == other.Reading.Handle &&
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches