Skip to content

Commit

Permalink
chore: Adjust for null invocation validation
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromelaban authored Jun 12, 2024
1 parent ea73475 commit 95318ac
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -699,12 +699,8 @@ public DependencyObject TemplatedParent
{protectedModifier} {virtualModifier} void OnTemplatedParentChanged(DependencyPropertyChangedEventArgs e)
{{
// Attempt to work around a native fault
if (this != null)
{{
__Store.SetTemplatedParent(e.NewValue as FrameworkElement);
OnTemplatedParentChangedPartial(e);
}}
__Store.SetTemplatedParent(e.NewValue as FrameworkElement);
OnTemplatedParentChangedPartial(e);
}}
#endregion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -834,6 +834,12 @@ public override CGRect Frame

set
{
if (this is null)
{
// Don't fail on null instance from native call
return;
}

base.Frame = value;

try
Expand Down

0 comments on commit 95318ac

Please sign in to comment.