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 ...@@ -127,7 +127,7 @@ static HRESULT WINAPI IDirectMusic8Impl_CreatePort (LPDIRECTMUSIC8 iface, REFCLS
if (IsEqualCLSID (rclsidPort, &PortCaps.guidPort)) { if (IsEqualCLSID (rclsidPort, &PortCaps.guidPort)) {
hr = DMUSIC_CreateDirectMusicPortImpl(&IID_IDirectMusicPort, (LPVOID*) &pNewPort, (LPUNKNOWN) This, pPortParams, &PortCaps); hr = DMUSIC_CreateDirectMusicPortImpl(&IID_IDirectMusicPort, (LPVOID*) &pNewPort, (LPUNKNOWN) This, pPortParams, &PortCaps);
if (FAILED(hr)) { if (FAILED(hr)) {
*ppPort = (LPDIRECTMUSICPORT) NULL; *ppPort = NULL;
return hr; return hr;
} }
This->nrofports++; This->nrofports++;
...@@ -255,7 +255,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicImpl (LPCGUID lpcGUID, LPVOID* ppobj, LPU ...@@ -255,7 +255,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicImpl (LPCGUID lpcGUID, LPVOID* ppobj, LPU
dmusic = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusic8Impl)); dmusic = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusic8Impl));
if (NULL == dmusic) { if (NULL == dmusic) {
*ppobj = (LPDIRECTMUSIC8) NULL; *ppobj = NULL;
return E_OUTOFMEMORY; return E_OUTOFMEMORY;
} }
dmusic->lpVtbl = &DirectMusic8_Vtbl; dmusic->lpVtbl = &DirectMusic8_Vtbl;
......
...@@ -243,8 +243,8 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicPortImpl (LPCGUID lpcGUID, LPVOID *ppobj, ...@@ -243,8 +243,8 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicPortImpl (LPCGUID lpcGUID, LPVOID *ppobj,
TRACE("(%p,%p,%p)\n", lpcGUID, ppobj, pUnkOuter); TRACE("(%p,%p,%p)\n", lpcGUID, ppobj, pUnkOuter);
obj = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicPortImpl)); obj = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicPortImpl));
if (NULL == obj) { if (NULL == obj) {
*ppobj = (LPDIRECTMUSICPORT) NULL; *ppobj = NULL;
return E_OUTOFMEMORY; return E_OUTOFMEMORY;
} }
obj->lpVtbl = &DirectMusicPort_Vtbl; 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