It is possible for a QRhiD3D12 instance to be created and destroyed before the cmdAllocators list is initialized. This change simply guards the cmdAllocators so that Release is only called if the element is not nullptr. For an example of how this can happen see QRhi::create. The QRhiD3D12 is created but may be released immediately if QRhiD3D12::create fails. One way this may happen is if the ID3D12Device is removed but in practice many different errors may cause create to fail. Pick-to: 6.6 Change-Id: I395d247a952f9584122be083ac5ca6a3caddf300 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> (cherry picked from commit 63c8c1e862ee7dcd98dfd0d786e65e1b4fa05267) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
…
Description
Languages
C++
84.3%
HTML
4.9%
C
3.9%
CMake
3.6%
Objective-C++
2%
Other
0.8%