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:
@@ -165,7 +165,10 @@ namespace Nz
|
||||
inline void Surface::Destroy()
|
||||
{
|
||||
if (m_surface != VK_NULL_HANDLE)
|
||||
{
|
||||
m_instance.vkDestroySurfaceKHR(m_instance, m_surface, (m_allocator.pfnAllocation) ? &m_allocator : nullptr);
|
||||
m_surface = VK_NULL_HANDLE;
|
||||
}
|
||||
}
|
||||
|
||||
inline VkResult Surface::GetLastErrorCode() const
|
||||
|
||||
Reference in New Issue
Block a user