dmusic: Increment the refcount when a IReferenceClock pointer is returned.
Michael Stefaniuc
mstefani at redhat.de
Mon Jun 16 16:22:54 CDT 2014
---
Issue uncovered by d82e2935e41da81bd9e5576046c362ea091d0fe1
http://bugs.winehq.org/show_bug.cgi?id=36722
dlls/dmusic/dmusic.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/dlls/dmusic/dmusic.c b/dlls/dmusic/dmusic.c
index 28be851..09a7f53 100644
--- a/dlls/dmusic/dmusic.c
+++ b/dlls/dmusic/dmusic.c
@@ -210,8 +210,10 @@ static HRESULT WINAPI IDirectMusic8Impl_GetMasterClock(LPDIRECTMUSIC8 iface, LPG
if (guid_clock)
*guid_clock = This->pMasterClock->pClockInfo.guidClock;
- if (reference_clock)
- *reference_clock = (IReferenceClock*)This->pMasterClock;
+ if (reference_clock) {
+ *reference_clock = &This->pMasterClock->IReferenceClock_iface;
+ IReferenceClock_AddRef(*reference_clock);
+ }
return S_OK;
}
--
1.8.3.1
More information about the wine-patches
mailing list