Skip to content
Open
Prev Previous commit
Next Next commit
mantle: fix device check for destruction
  • Loading branch information
Cherser-s committed Sep 8, 2023
commit 241106a15398c0663f0d65043d078d27da28bfd1
2 changes: 1 addition & 1 deletion src/mantle/mantle_init_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -925,7 +925,7 @@ GR_RESULT GR_STDCALL grCreateDevice(
*pDevice = (GR_DEVICE)grDevice;

bail:
if (res != GR_SUCCESS) {
if (res != GR_SUCCESS && vkDevice != VK_NULL_HANDLE) {
vkd.vkDestroyDevice(vkDevice, NULL);
}

Expand Down