Skip to content

Commit

Permalink
Merge pull request #4757 from CommunityToolkit/PR4750Fix
Browse files Browse the repository at this point in the history
AttachedDropShadowCrashFix
  • Loading branch information
michael-hawker authored Sep 22, 2022
2 parents fdaef47 + 3ca0e49 commit c4d62ee
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Microsoft.Toolkit.Uwp.UI/Shadows/AttachedShadowBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,12 @@ public AttachedShadowElementContext GetElementContext(FrameworkElement element)
/// <inheritdoc/>
public IEnumerable<AttachedShadowElementContext> EnumerateElementContexts()
{
foreach (var kvp in ShadowElementContextTable)
if (ShadowElementContextTable != null)
{
yield return kvp.Value;
foreach (var kvp in ShadowElementContextTable)
{
yield return kvp.Value;
}
}
}

Expand Down

0 comments on commit c4d62ee

Please sign in to comment.