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)))