fix crash from junk data

This commit is contained in:
Gregory Wells
2026-05-25 12:13:25 -04:00
parent 96ddecda52
commit a252a9cf6b
@@ -40,6 +40,7 @@ gnReturnCode vulkanGetSurfaceCapabilities(gnPhysicalDevice device, gnSurface sur
return vulkanCodeToGryphnCode(result);
}
gnReturnCode vulkanGetSurfaceFormats(gnPhysicalDevice device, gnSurface surface, uint32_t* formatCount, gnSurfaceFormat* formats) {
*formatCount = 0;
uint32_t internal_formatCout;
gnReturnCode result = vulkanCodeToGryphnCode(vkGetPhysicalDeviceSurfaceFormatsKHR(device->internalData, surface, &internal_formatCout, NULL));
if (result != GN_SUCCESS) {
@@ -68,6 +69,7 @@ gnReturnCode vulkanGetSurfaceFormats(gnPhysicalDevice device, gnSurface surface,
return GN_SUCCESS;
}
gnReturnCode vulkanGetSurfacePresentModes(gnPhysicalDevice device, gnSurface surface, uint32_t* presentModeCount, gnPresentMode* presentModes) {
*presentModeCount = 0;
uint32_t internal_presentModeCount;
gnReturnCode result = vulkanCodeToGryphnCode(vkGetPhysicalDeviceSurfacePresentModesKHR(device->internalData, surface, &internal_presentModeCount, NULL));
if (result != GN_SUCCESS) {