Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Guard against nullptr cmdAllocators Release call
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. Change-Id: I395d247a952f9584122be083ac5ca6a3caddf300 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> (cherry picked from commit 63c8c1e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 7ad4db5)
- Loading branch information