Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: XamlRoot may be null when the SKXamlCanvas is unloaded #2854

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

jeromelaban
Copy link
Contributor

Description of Change

Avoids an NRE when using a null XamlRoot on WinUI when the control is unloading.

API Changes

None.

Behavioral Changes

None.

Required skia PR

None.

Copy link
Contributor

Hey there @jeromelaban! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@jeromelaban
Copy link
Contributor Author

@mattleibow could it be possible to backport this one to 2.88? Thanks!

Copy link

@jdobelstein jdobelstein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jeromelaban is a null check in on the root.Invalidate call needed for the same reason? Couldn't hurt.

@jeromelaban
Copy link
Contributor Author

jeromelaban is a null check in on the root.Invalidate call needed for the same reason? Couldn't hurt.

That's fair. I ignored that particular site because the XamlRoot.Changed event is called only when XamlRoot is set, but indeed, it does not hurt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants