Michael Stefaniuc : dmusic: Increment the refcount when a IReferenceClock pointer is returned.
Alexandre Julliard
julliard at winehq.org
Tue Jun 17 14:40:50 CDT 2014
Module: wine
Branch: master
Commit: 5e1783b59ad4dd0bfa1f80d2b35ce840d6c5bf08
URL: http://source.winehq.org/git/wine.git/?a=commit;h=5e1783b59ad4dd0bfa1f80d2b35ce840d6c5bf08
Author: Michael Stefaniuc <mstefani at redhat.de>
Date: Mon Jun 16 23:22:54 2014 +0200
dmusic: Increment the refcount when a IReferenceClock pointer is returned.
---
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;
}
More information about the wine-cvs
mailing list