From: dongsug.song Date: Fri, 28 Apr 2017 12:34:01 +0000 (+0900) Subject: Fix == operator overriding bug X-Git-Tag: preview1-00180^2~286^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6a768ffea474485a13ce1cdf117ed69ebf0788eb;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git Fix == operator overriding bug Change-Id: Id25fa18c89c9e2dda8a2c0f04b6178173beb5c6f Signed-off-by: dongsug.song --- diff --git a/src/Tizen.NUI/src/internal/BaseHandle.cs b/src/Tizen.NUI/src/internal/BaseHandle.cs index 82b3f4f95..8f77f37f6 100755 --- a/src/Tizen.NUI/src/internal/BaseHandle.cs +++ b/src/Tizen.NUI/src/internal/BaseHandle.cs @@ -95,8 +95,19 @@ public class BaseHandle : global::System.IDisposable { // drop into native code to see if both handles point to the same body return x.IsEqual( y) ; } - return false; + if (BaseHandle.ReferenceEquals(x, null) && !BaseHandle.ReferenceEquals(y, null)) + { + if (y.HasBody()) return false; + else return true; + } + if (!BaseHandle.ReferenceEquals(x, null) && BaseHandle.ReferenceEquals(y, null)) + { + if (x.HasBody()) return false; + else return true; + } + + return false; } // Inequality operator. Returns Null if either operand is Null @@ -239,3 +250,4 @@ public class BaseHandle : global::System.IDisposable { } } +