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

Ensure image source has been set before calling BitmapSource::SetSourceAsync #4652

Merged

Conversation

chriche-ms
Copy link
Member

@chriche-ms chriche-ms commented Aug 25, 2020

Related Issue

Fixes #4651

Description

A previous PR #4225 updated the XAML image loading code to use the asynchronous BitmapSource::SetSourceAsync function in order to improve rendering performance. This had the unintended side effect of causing the background image loading code to crash as it assumed IImage::get_Source cannot return a null pointer. To avoid the crash the image source is now set before calling BitmapSource::SetSourceAsync.

How Verified

The fix was verified through manual testing of the Cortana in Windows application.

Microsoft Reviewers: Open in CodeFlow

…lls to IImage::get_Source do not succeed but return a null source.
@chriche-ms chriche-ms self-assigned this Aug 25, 2020
Copy link
Contributor

@RebeccaAnne RebeccaAnne left a comment

Choose a reason for hiding this comment

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

:shipit:

@chriche-ms chriche-ms merged commit a940482 into microsoft:main Aug 27, 2020
@shalinijoshi19 shalinijoshi19 added this to the 20.08 milestone Aug 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[UWP] Crash in TileControl::LoadImageBrush while applying background image to root panel
3 participants