diff --git a/dlls/dsound/primary.c b/dlls/dsound/primary.c index 228984bc052..1737a2b8a56 100644 --- a/dlls/dsound/primary.c +++ b/dlls/dsound/primary.c @@ -571,20 +571,13 @@ static DWORD WINAPI PrimaryBufferImpl_Release(LPDIRECTSOUNDBUFFER8 iface) { ref = InterlockedDecrement(&(This->ref)); - /* the listener has a reference to us which must be removed */ - if ((ref == 0) || ((ref == 1) && (This->dsound->listener))) { + if (ref == 0) { IDirectSound_Release((LPDIRECTSOUND)This->dsound); if (This->dsound->listener) { IDirectSound3DListener_Release((LPDIRECTSOUND3DLISTENER)This->dsound->listener); This->dsound->listener = NULL; - ref--; } -#if 0 - if (This->iks) { - HeapFree(GetProcessHeap(), 0, This->iks); - } -#endif HeapFree(GetProcessHeap(),0,This); } diff --git a/dlls/dsound/sound3d.c b/dlls/dsound/sound3d.c index b0999df6478..4be42373458 100644 --- a/dlls/dsound/sound3d.c +++ b/dlls/dsound/sound3d.c @@ -1042,7 +1042,8 @@ HRESULT WINAPI IDirectSound3DListenerImpl_Create( InitializeCriticalSection(&dsl->lock); dsl->dsb = This; - IDirectSoundBuffer8_AddRef((LPDIRECTSOUNDBUFFER8)This); + /* NOTE: don't add a reference because it would cause a circular reference */ + /* IDirectSoundBuffer8_AddRef((LPDIRECTSOUNDBUFFER8)This); */ *pdsl = dsl; return S_OK;