Vulkan: Fix freeze when closing pad view (#435)

This commit is contained in:
goeiecool9999 2022-11-06 00:40:00 +01:00 committed by GitHub
parent 948460cad7
commit 138510106c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 56 additions and 36 deletions

View file

@ -41,6 +41,12 @@ VulkanCanvas::~VulkanCanvas()
{
Unbind(wxEVT_PAINT, &VulkanCanvas::OnPaint, this);
Unbind(wxEVT_SIZE, &VulkanCanvas::OnResize, this);
if(!m_is_main_window)
{
if(auto vulkan_renderer = VulkanRenderer::GetInstance())
vulkan_renderer->StopUsingPadAndWait();
}
}
void VulkanCanvas::OnPaint(wxPaintEvent& event)