You should check that EnumAdapters1 returns S_OK.
Also you should check that GetDesc1 return S_OK.
If they don't return S_OK, then their error return code should hint where the problem lies - Get Desc1 expects pointer to existing structure, not NULL. It write to the object passed, but if you pass NULL there's nowhere to write adapter properties.
So you should write:
DXGI_ADAPTER_DESC1 temp_desc; if (FAILED(adapter_ptr->GetDesc1(&temp_desc)) { error }
@NewDisplayName: nullptr is now standard way in C++11 how to say NULL.
Thank you so mcuh Martins Mozeiko for your help, you are correct the problem was passing NULL pointer to GetDesc1().
@NewDisplayName thanks for the link and for your replies

Find content
Not Telling

