From 6a768ffea474485a13ce1cdf117ed69ebf0788eb Mon Sep 17 00:00:00 2001 From: "dongsug.song" Date: Fri, 28 Apr 2017 21:34:01 +0900 Subject: [PATCH] Fix == operator overriding bug Change-Id: Id25fa18c89c9e2dda8a2c0f04b6178173beb5c6f Signed-off-by: dongsug.song --- src/Tizen.NUI/src/internal/BaseHandle.cs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) 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 { } } + -- 2.34.1