Vulkan: Protect against CommandBufferLabelScope double-dispose

This commit is contained in:
Wunkolo 2023-09-11 19:15:27 -07:00
parent c16e52f9c2
commit 683c67b3c8

View file

@ -21,6 +21,7 @@ namespace Ryujinx.Graphics.Vulkan
class CommandBufferLabelScope : ILabelScopePrivate class CommandBufferLabelScope : ILabelScopePrivate
{ {
private CommandBuffer _commandBuffer; private CommandBuffer _commandBuffer;
private bool _disposed;
private readonly ExtDebugUtils _debugUtils; private readonly ExtDebugUtils _debugUtils;
@ -73,7 +74,13 @@ namespace Ryujinx.Graphics.Vulkan
public void Dispose() public void Dispose()
{ {
if (_disposed)
{
return;
}
EndLabel(); EndLabel();
_disposed = true;
} }
} }
} }