diff --git a/ChangeLog b/ChangeLog index 386fd244e..1eaa0f333 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2002-10-20 Miguel de Icaza + + * glib/Object.cs: Avoid recursive calls with the previous operator + != and operator == + 2002-10-19 Duncan Mak * glib/Source.cs: Added. diff --git a/glib/Object.cs b/glib/Object.cs index 0598106de..7f17bf5e9 100644 --- a/glib/Object.cs +++ b/glib/Object.cs @@ -218,12 +218,38 @@ namespace GLib { public static bool operator == (Object a, Object b) { - return a.Equals (b); + object oa = a; + object ob = b; + + if (ob == null){ + if (oa == null) + return true; + else + return false; + } else { + if (oa == null) + return false; + else + return a.Equals (b); + } } public static bool operator != (Object a, Object b) { - return !a.Equals (b); + object oa = a; + object ob = b; + + if (ob == null){ + if (oa == null) + return false; + else + return true; + } else { + if (oa == null) + return true; + else + return !a.Equals (b); + } } ///