If pointers are not explicitly initalized they can contain any random value.
the MSVC compiler doesn't set this to be the defaut nullptr in debug, but instead to 0xCDCDCDCD.
This lead to the application crashing on startup, since get_vksurface wasn't initalizing the surface because of the if (!vulkan_surface) condition evaluating to false.
Thank you so much for this! I never noticed the PR because I don't go on GitHub often, but I fixed this! Great catch. I didn't think people would be submitting PRs, so I guess I will be checking GH more often!
If pointers are not explicitly initalized they can contain any random value. the MSVC compiler doesn't set this to be the defaut
nullptr
in debug, but instead to0xCDCDCDCD
. This lead to the application crashing on startup, sinceget_vksurface
wasn't initalizing the surface because of theif (!vulkan_surface)
condition evaluating to false.