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

Make sure to account for a null AppWindow #17746

Merged
merged 4 commits into from Oct 3, 2023
Merged

Make sure to account for a null AppWindow #17746

merged 4 commits into from Oct 3, 2023

Conversation

PureWeen
Copy link
Member

Description of Change

When opening a new WinUI window. If the user parents that to the current window UI.Xaml.Window.AppWindow will be null so we need to account for this.

I've also added Window.AppWindow to our set of banned APIs since it doesn't have null safety. Our GetAppWindow API does so that should keep us in a safer place to not regress this issue.

Issues Fixed

Fixes #17490

@PureWeen PureWeen requested a review from a team as a code owner September 29, 2023 17:05
@PureWeen PureWeen requested review from rmarinho and removed request for rmarinho September 29, 2023 17:05
mattleibow
mattleibow previously approved these changes Sep 29, 2023
@samhouts samhouts added this to the .NET 8 SR1 milestone Oct 3, 2023
@rmarinho rmarinho merged commit 90aee47 into main Oct 3, 2023
47 checks passed
@rmarinho rmarinho deleted the fix_17490 branch October 3, 2023 11:28
@PureWeen
Copy link
Member Author

/backport to release/8.0.1xx-rc2.2

@github-actions
Copy link
Contributor

Started backporting to release/8.0.1xx-rc2.2: https://github.com/dotnet/maui/actions/runs/6631908834

@github-actions github-actions bot locked and limited conversation to collaborators Dec 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[regression/8.0.0-preview.4.8333] Crash using Pinvoke.SetParent to create Window as Child
6 participants