From: Michael Stefaniuc Subject: dsound: Avoid casts from COM object to interface. Message-Id: <20161208102942.GB17070@redhat.com> Date: Thu, 8 Dec 2016 11:29:42 +0100 Signed-off-by: Michael Stefaniuc --- dlls/dsound/dsound.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/dsound/dsound.c b/dlls/dsound/dsound.c index 43b252d..d11c864 100644 --- a/dlls/dsound/dsound.c +++ b/dlls/dsound/dsound.c @@ -452,8 +452,8 @@ static HRESULT DirectSoundDevice_CreateSoundBuffer( if (device->primary) { WARN("Primary Buffer already created\n"); - IDirectSoundBuffer_AddRef((LPDIRECTSOUNDBUFFER8)(device->primary)); - *ppdsb = (LPDIRECTSOUNDBUFFER)(device->primary); + *ppdsb = (IDirectSoundBuffer *)&device->primary->IDirectSoundBuffer8_iface; + IDirectSoundBuffer_AddRef(*ppdsb); } else { hres = primarybuffer_create(device, &device->primary, dsbd); if (device->primary) { -- 2.7.4