Skip to content

Commit 89451cd

Browse files
Correct error handling while detecing adapter luid for GL
Change-Id: I332b0de7764ceb1b1dade5552ca39eeda868992e Signed-off-by: Mateusz Jablonski <[email protected]>
1 parent c031bf5 commit 89451cd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

opencl/source/sharings/gl/windows/gl_sharing_windows.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,9 @@ void GLSharingFunctionsWindows::initAdapterLuid() {
187187
bool found = false;
188188

189189
HRESULT hr = Wddm::createDxgiFactory(__uuidof(IDXGIFactory), (void **)(&pFactory));
190+
if ((hr != S_OK) || (pFactory == nullptr)) {
191+
return;
192+
}
190193
iDevNum = 0u;
191194
while (pFactory->EnumAdapters1(iDevNum++, &pAdapter) != DXGI_ERROR_NOT_FOUND) {
192195
IDXGIOutput *pOutput = nullptr;

0 commit comments

Comments
 (0)