Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix bug when blur command received on node without XamlRoot (#12051)
## Description ### Type of Change _Erase all that don't apply._ - Bug fix (non-breaking change which fixes an issue) ### Why We are seeing crashes on quit when the blur command is called roughly around the same time that the React instance is being shut down. It's likely because the result of tryGetXamlRoot is null. ### What This change falls back on the GetFocusedElement() overload without any parameters if the XamlRoot is null, as supplying a null parameter will result in a NPE. ## Testing It's a tricky race condition to repro, but I did validate that passing a null XamlRoot value to `FocusManager::GetFocusedElement(XamlRoot)` will throw an exception. ## Changelog Should this change be included in the release notes: _yes_ Fix for NPE when blur command is received while React instance is shutting down.
- Loading branch information