Vulkan: Fix Destroy() method of object not resetting the internal pointer

Leading to double-delete if Delete() was explictly called


Former-commit-id: 0f42bc70913b64eb60193035ae15285fcc8c88ad [formerly 6d8b0e87e7b2edfb2052671a059863b3ce439fcc]
Former-commit-id: 2806bd83474c0c12fb88b9562b6baf71cc7692c1
This commit is contained in:
Lynix
2016-06-01 20:59:39 +02:00
parent c75f3ce28b
commit baa0dc3e3d
4 changed files with 11 additions and 0 deletions

View File

@@ -29,6 +29,8 @@ namespace Nz
{
vkDeviceWaitIdle(m_device);
vkDestroyDevice(m_device, (m_allocator.pfnAllocation) ? &m_allocator : nullptr);
m_device = nullptr;
}
}