diff --git a/Backends/Graphics5/Direct3D12/Sources/kinc/backend/graphics5/Direct3D12.c.h b/Backends/Graphics5/Direct3D12/Sources/kinc/backend/graphics5/Direct3D12.c.h index 1d14022d8..473263785 100644 --- a/Backends/Graphics5/Direct3D12/Sources/kinc/backend/graphics5/Direct3D12.c.h +++ b/Backends/Graphics5/Direct3D12/Sources/kinc/backend/graphics5/Direct3D12.c.h @@ -437,10 +437,11 @@ void kinc_g5_internal_init() { #ifdef KORE_WINDOWS #ifdef _DEBUG ID3D12Debug *debugController = NULL; - D3D12GetDebugInterface(IID_PPV_ARGS(&debugController)); - debugController->EnableDebugLayer(); + if (D3D12GetDebugInterface(IID_PPV_ARGS(&debugController)) == S_OK) { + debugController->EnableDebugLayer(); + } #endif - D3D12CreateDevice(NULL, D3D_FEATURE_LEVEL_11_0, IID_PPV_ARGS(&device)); + kinc_microsoft_affirm(D3D12CreateDevice(NULL, D3D_FEATURE_LEVEL_11_0, IID_PPV_ARGS(&device))); createRootSignature(); createComputeRootSignature();