diff --git a/gfx/common/d3d12_common.c b/gfx/common/d3d12_common.c index 7008a3fbcf..a2055a7cef 100644 --- a/gfx/common/d3d12_common.c +++ b/gfx/common/d3d12_common.c @@ -192,10 +192,10 @@ bool d3d12_init_base(d3d12_video_t* d3d12) #ifdef __WINRT__ if (FAILED(DXGIEnumAdapters2(d3d12->factory, i, &d3d12->adapter))) - return false; + break; #else if (FAILED(DXGIEnumAdapters(d3d12->factory, i, &d3d12->adapter))) - return false; + break; #endif IDXGIAdapter_GetDesc(d3d12->adapter, &desc); diff --git a/gfx/common/d3d12_common.h b/gfx/common/d3d12_common.h index ef4a7863fc..01ccc2020b 100644 --- a/gfx/common/d3d12_common.h +++ b/gfx/common/d3d12_common.h @@ -159,7 +159,7 @@ static INLINE HRESULT D3D12ResetCommandAllocator(D3D12CommandAllocator command_a static INLINE ULONG D3D12ReleaseFence(D3D12Fence fence) { return fence->lpVtbl->Release(fence); } static INLINE UINT64 D3D12GetCompletedValue(D3D12Fence fence) { - return fence->lpVtbl->GetCompletedValue(fence); + return fence && fence->lpVtbl->GetCompletedValue(fence); } static INLINE HRESULT D3D12SetEventOnCompletion(D3D12Fence fence, UINT64 value, HANDLE h_event) {