Skip to content

Commit a7a93b8

Browse files
committed
Merge branch 'master' of github.com:postsharp/PostSharp.Samples
2 parents 69cb080 + 38cc6ad commit a7a93b8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Framework/PostSharp.Samples.WeakEvent/WeakEventAttribute.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ private bool RemoveHandler(Delegate handler)
124124

125125
handlers =
126126
handlers.RemoveAll(
127-
o => ReferenceEquals(((WeakReference) o).Target, handler));
127+
o => ((WeakReference)o).Target?.Equals(handler) ?? false);
128128

129129
return handlers.IsEmpty;
130130
}

0 commit comments

Comments
 (0)