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.9 6.8
Fixes: QTBUG-133405
Change-Id: I88ac7c841dc0c28fc3f6b37c3402315b52de0a66
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
This commit is contained in:
Laszlo Agocs 2025-02-03 14:08:21 +01:00
parent f06dd09169
commit 68e48ac60a

View File

@ -3817,7 +3817,7 @@ void QRhiD3D12::finishActiveReadbacks(bool forced)
if (readback.result->completed)
completedCallbacks.append(readback.result->completed);
activeReadbacks.removeLast();
activeReadbacks.remove(i);
}
}