mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 14:51:40 +00:00
- fix shutdown crash due to GetVulkanFrameBuffer returning null when VulkanFrameBuffer is destroyed
This commit is contained in:
parent
ab8378152f
commit
23d0cce395
1 changed files with 6 additions and 1 deletions
|
@ -93,9 +93,12 @@ VulkanFrameBuffer::VulkanFrameBuffer(void *hMonitor, bool fullscreen, VulkanDevi
|
|||
|
||||
VulkanFrameBuffer::~VulkanFrameBuffer()
|
||||
{
|
||||
// screen is already null at this point, but VkHardwareTexture::ResetAll needs it during clean up. Is there a better way we can do this?
|
||||
auto tmp = screen;
|
||||
screen = this;
|
||||
|
||||
// All descriptors must be destroyed before the descriptor pool in renderpass manager is destroyed
|
||||
VkHardwareTexture::ResetAll();
|
||||
|
||||
VKBuffer::ResetAll();
|
||||
PPResource::ResetAll();
|
||||
|
||||
|
@ -107,6 +110,8 @@ VulkanFrameBuffer::~VulkanFrameBuffer()
|
|||
delete mLights;
|
||||
mShadowMap.Reset();
|
||||
|
||||
screen = tmp;
|
||||
|
||||
DeleteFrameObjects();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue