rhi: d3d: Gracefully handle EnumOutputs failures
Fixes: QTBUG-129147 Pick-to: 6.8 6.7 6.5 Change-Id: Idec2678135ae4622537bece35c4253d933655b10 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
This commit is contained in:
parent
3fbae61ea2
commit
d36dde3740
@ -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