Don't crash by reading a nullptr when changing the rendering resolution.
Merge pull request #5439 from thedax/win32CrashFix

WinUI: Don't crash by referencing a nullptr when changing the rendering resolution.