Commit 892f7359 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

dmusic: Do not cast NULL.

parent 706df65c
......@@ -127,7 +127,7 @@ static HRESULT WINAPI IDirectMusic8Impl_CreatePort (LPDIRECTMUSIC8 iface, REFCLS
if (IsEqualCLSID (rclsidPort, &PortCaps.guidPort)) {
hr = DMUSIC_CreateDirectMusicPortImpl(&IID_IDirectMusicPort, (LPVOID*) &pNewPort, (LPUNKNOWN) This, pPortParams, &PortCaps);
if (FAILED(hr)) {
*ppPort = (LPDIRECTMUSICPORT) NULL;
*ppPort = NULL;
return hr;
}
This->nrofports++;
......@@ -255,7 +255,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicImpl (LPCGUID lpcGUID, LPVOID* ppobj, LPU
dmusic = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusic8Impl));
if (NULL == dmusic) {
*ppobj = (LPDIRECTMUSIC8) NULL;
*ppobj = NULL;
return E_OUTOFMEMORY;
}
dmusic->lpVtbl = &DirectMusic8_Vtbl;
......
......@@ -244,7 +244,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicPortImpl (LPCGUID lpcGUID, LPVOID *ppobj,
obj = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicPortImpl));
if (NULL == obj) {
*ppobj = (LPDIRECTMUSICPORT) NULL;
*ppobj = NULL;
return E_OUTOFMEMORY;
}
obj->lpVtbl = &DirectMusicPort_Vtbl;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment