dsound: Don't dereference a freed object.

This commit is contained in:
Andrew Eikum 2011-09-21 11:25:27 -05:00 committed by Alexandre Julliard
parent 74a3d9ee5e
commit e2cc32d252
1 changed files with 1 additions and 1 deletions

View File

@ -787,9 +787,9 @@ static ULONG WINAPI IDirectSound3DListenerImpl_Release(LPDIRECTSOUND3DLISTENER i
if (!ref) {
This->device->listener = 0;
HeapFree(GetProcessHeap(), 0, This);
if (!InterlockedDecrement(&This->device->primary->numIfaces))
primarybuffer_destroy(This->device->primary);
HeapFree(GetProcessHeap(), 0, This);
TRACE("(%p) released\n", This);
}
return ref;