From 987ff07a85e7d9676e10e1792a1749d290d7ffa5 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Mon, 3 Feb 2025 14:08:21 +0100 Subject: [PATCH] rhi: d3d12: Fix crash in readbacks Amends 73405890b8911dd1a58120665ce63a38281c6ce4. The patch here does the same for D3D12 as that previous one did for the Vulkan backend. Others, like D3D11, are not effected because the loop logic there does not branch. Pick-to: 6.8 Fixes: QTBUG-133405 Change-Id: I88ac7c841dc0c28fc3f6b37c3402315b52de0a66 Reviewed-by: Andy Nichols (cherry picked from commit 68e48ac60a9681887999e31f6dff622eb81bdb7d) Reviewed-by: Qt Cherry-pick Bot --- src/gui/rhi/qrhid3d12.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/rhi/qrhid3d12.cpp b/src/gui/rhi/qrhid3d12.cpp index 3499a2b44d4..477b3ecc084 100644 --- a/src/gui/rhi/qrhid3d12.cpp +++ b/src/gui/rhi/qrhid3d12.cpp @@ -3768,7 +3768,7 @@ void QRhiD3D12::finishActiveReadbacks(bool forced) if (readback.result->completed) completedCallbacks.append(readback.result->completed); - activeReadbacks.removeLast(); + activeReadbacks.remove(i); } }