Skip to content

Commit

Permalink
Update EventSource.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
davmason committed Mar 22, 2023
1 parent 0f76e59 commit 0313b10
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4286,9 +4286,9 @@ private static void RemoveReferencesToListenerInEventSources(EventListener liste
// eventSource.m_Dispatchers could have mutated
foreach (WeakReference<EventSource> eventSourceRef in s_EventSources)
{
if (eventSourceRef.TryGetTarget(out EventSource? eventSource))
if (eventSourceRef.TryGetTarget(out EventSource? eventSource)
&& eventSource.m_Dispatchers != null)
{
Debug.Assert(eventSource.m_Dispatchers != null);
// Is the first output dispatcher the dispatcher we are removing?
if (eventSource.m_Dispatchers.m_Listener == listenerToRemove)
{
Expand Down

0 comments on commit 0313b10

Please sign in to comment.