mirror of
https://github.com/moonlight-stream/moonlight-qt
synced 2024-11-10 13:44:17 +00:00
Fix crash if pl_vulkan_create() fails
This commit is contained in:
parent
333d97160e
commit
3ddc8ad68a
1 changed files with 11 additions and 9 deletions
|
@ -96,6 +96,7 @@ PlVkRenderer::PlVkRenderer(IFFmpegRenderer* backendRenderer) :
|
|||
|
||||
PlVkRenderer::~PlVkRenderer()
|
||||
{
|
||||
if (m_Vulkan != nullptr) {
|
||||
for (int i = 0; i < (int)SDL_arraysize(m_Overlays); i++) {
|
||||
if (m_Overlays[i].hasOverlay) {
|
||||
pl_tex_destroy(m_Vulkan->gpu, &m_Overlays[i].overlay.tex);
|
||||
|
@ -108,6 +109,7 @@ PlVkRenderer::~PlVkRenderer()
|
|||
for (int i = 0; i < (int)SDL_arraysize(m_Textures); i++) {
|
||||
pl_tex_destroy(m_Vulkan->gpu, &m_Textures[i]);
|
||||
}
|
||||
}
|
||||
|
||||
pl_renderer_destroy(&m_Renderer);
|
||||
pl_swapchain_destroy(&m_Swapchain);
|
||||
|
|
Loading…
Reference in a new issue