Merge pull request #1967 from D-POWER/master
[mono.git] / mcs / class / Mono.Posix / Mono.Unix / UnixPipes.cs
index 588b6cf0881998b873ad826cc04fb8281c2b1fc4..9128a8698eecef64650b7f32180d898b6421f7fa 100644 (file)
@@ -34,9 +34,7 @@ using Mono.Unix;
 namespace Mono.Unix {
 
        public struct UnixPipes
-#if NET_2_0
                : IEquatable <UnixPipes>
-#endif
        {
                public UnixPipes (UnixStream reading, UnixStream writing)
                {
@@ -57,7 +55,7 @@ namespace Mono.Unix {
 
                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 &&