Re: [PATCH 07/11] dxgi: Do not store IDXGIOutputs in IDXGIAdapter.
13 Apr
2016
13 Apr
'16
10:35 a.m.
On 12 April 2016 at 12:29, Józef Kucia <jkucia(a)codeweavers.com> wrote:
+HRESULT dxgi_output_create(struct dxgi_adapter *adapter, struct dxgi_output **output) +{ + if (!(*output = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(**output)))) + { + *output = NULL; + return E_OUTOFMEMORY; + } Explicitly setting output variables to NULL on failure can be ok (although I don't think it's needed for dxgi_output_create()), but note that *output is already NULL when HeapAlloc() fails.
3533
Age (days ago)
3533
Last active (days ago)
0 comments
1 participants
participants (1)
-
Henri Verbeet