From 86f59e62c0b0ce0011c058e4f88b07fdd866ae70 Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Fri, 10 Jul 2020 21:01:52 -0700 Subject: [PATCH] Minor code cleanup --- Texconv/texconv.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Texconv/texconv.cpp b/Texconv/texconv.cpp index 25a0817..a0410b4 100644 --- a/Texconv/texconv.cpp +++ b/Texconv/texconv.cpp @@ -826,7 +826,9 @@ namespace wprintf(L"\n :\n"); ComPtr adapter; - for (UINT adapterIndex = 0; DXGI_ERROR_NOT_FOUND != dxgiFactory->EnumAdapters(adapterIndex, adapter.ReleaseAndGetAddressOf()); ++adapterIndex) + for (UINT adapterIndex = 0; + SUCCEEDED(dxgiFactory->EnumAdapters(adapterIndex, adapter.ReleaseAndGetAddressOf())); + ++adapterIndex) { DXGI_ADAPTER_DESC desc; if (SUCCEEDED(adapter->GetDesc(&desc)))