GabeRundlett / gvox_engine

MIT License
325 stars 19 forks source link

fixed crash on startup (windows and msvc) #1

Closed Kojox closed 2 years ago

Kojox commented 2 years ago

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.

GabeRundlett commented 2 years ago

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!