diff --git a/include/Nazara/VulkanRenderer/Wrapper/DeviceObject.inl b/include/Nazara/VulkanRenderer/Wrapper/DeviceObject.inl index 8f80a8e8f..6da9b14b3 100644 --- a/include/Nazara/VulkanRenderer/Wrapper/DeviceObject.inl +++ b/include/Nazara/VulkanRenderer/Wrapper/DeviceObject.inl @@ -36,6 +36,8 @@ namespace Nz template bool DeviceObject::Create(Device& device, const CreateInfo& createInfo, const VkAllocationCallbacks* allocator) { + Destroy(); + m_device = &device; m_lastErrorCode = C::CreateHelper(*m_device, &createInfo, allocator, &m_handle); if (m_lastErrorCode != VkResult::VK_SUCCESS)