AbstractTexture: Fix crash in Vulkan backend when freeing texture

This commit is contained in:
Stenzek
2018-01-26 18:32:33 +10:00
parent 9a6644d06c
commit 81ae88d2d5
5 changed files with 4 additions and 7 deletions

View File

@ -93,7 +93,7 @@ std::unique_ptr<VKTexture> VKTexture::Create(const TextureConfig& tex_config)
VKTexture::~VKTexture()
{
// Texture is automatically cleaned up, however, we don't want to leave it bound.
StateTracker::GetInstance()->UnbindTexture(m_texture->GetView());
g_renderer->UnbindTexture(this);
if (m_framebuffer != VK_NULL_HANDLE)
g_command_buffer_mgr->DeferFramebufferDestruction(m_framebuffer);
}