diff --git a/src/DNA/corlib/System/Delegate.cs b/src/DNA/corlib/System/Delegate.cs index bd1f5494..ea3b7741 100644 --- a/src/DNA/corlib/System/Delegate.cs +++ b/src/DNA/corlib/System/Delegate.cs @@ -14,7 +14,8 @@ public override bool Equals(object obj) { if (d == null) { return false; } - return d.targetObj == this.targetObj && d.targetMethod.Equals(this.targetMethod); + // DNA currently can't handle boxing an IntPtr, so use the '==' overload instead (which doesn't have boxing) + return d.targetObj == this.targetObj && d.targetMethod == this.targetMethod; } public override int GetHashCode() { @@ -59,4 +60,4 @@ protected virtual Delegate RemoveImpl(Delegate d) { } } -#endif \ No newline at end of file +#endif