mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2025-01-12 21:59:12 +00:00
Vulkan: Protect against CommandBufferLabelScope
double-dispose
This commit is contained in:
parent
c16e52f9c2
commit
683c67b3c8
1 changed files with 7 additions and 0 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue