rhi: d3d: Gracefully handle EnumOutputs failures
Fixes: QTBUG-129147 Pick-to: 6.7 6.5 Change-Id: Idec2678135ae4622537bece35c4253d933655b10 Reviewed-by: Andy Nichols <andy.nichols@qt.io> (cherry picked from commit d36dde37401fa5d56c4451059e8b8ec2bc06419d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
ea5bff8feb
commit
84cd298084
@ -18,6 +18,8 @@ bool output6ForWindow(QWindow *w, IDXGIAdapter1 *adapter, IDXGIOutput6 **result)
|
|||||||
IDXGIOutput *currentOutput = nullptr;
|
IDXGIOutput *currentOutput = nullptr;
|
||||||
IDXGIOutput *output = nullptr;
|
IDXGIOutput *output = nullptr;
|
||||||
for (UINT i = 0; adapter->EnumOutputs(i, &output) != DXGI_ERROR_NOT_FOUND; ++i) {
|
for (UINT i = 0; adapter->EnumOutputs(i, &output) != DXGI_ERROR_NOT_FOUND; ++i) {
|
||||||
|
if (!output)
|
||||||
|
continue;
|
||||||
DXGI_OUTPUT_DESC desc;
|
DXGI_OUTPUT_DESC desc;
|
||||||
output->GetDesc(&desc);
|
output->GetDesc(&desc);
|
||||||
const RECT r = desc.DesktopCoordinates;
|
const RECT r = desc.DesktopCoordinates;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user