From 683c67b3c8681177d6b83761b60d189c026c02b9 Mon Sep 17 00:00:00 2001 From: Wunkolo Date: Mon, 11 Sep 2023 19:15:27 -0700 Subject: [PATCH] Vulkan: Protect against `CommandBufferLabelScope` double-dispose --- src/Ryujinx.Graphics.Vulkan/LabelScope.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Ryujinx.Graphics.Vulkan/LabelScope.cs b/src/Ryujinx.Graphics.Vulkan/LabelScope.cs index ea9f02d1e..61ffd4d4d 100644 --- a/src/Ryujinx.Graphics.Vulkan/LabelScope.cs +++ b/src/Ryujinx.Graphics.Vulkan/LabelScope.cs @@ -21,6 +21,7 @@ namespace Ryujinx.Graphics.Vulkan class CommandBufferLabelScope : ILabelScopePrivate { private CommandBuffer _commandBuffer; + private bool _disposed; private readonly ExtDebugUtils _debugUtils; @@ -73,7 +74,13 @@ namespace Ryujinx.Graphics.Vulkan public void Dispose() { + if (_disposed) + { + return; + } + EndLabel(); + _disposed = true; } } }