Michael Stefaniuc : dmime: The group for a track in a segment cannot be zero.
Alexandre Julliard
julliard at winehq.org
Wed Nov 27 16:32:28 CST 2019
Module: wine
Branch: master
Commit: f5ecdbc3527b52bd25093851de4b6c4d9697abbd
URL: https://source.winehq.org/git/wine.git/?a=commit;h=f5ecdbc3527b52bd25093851de4b6c4d9697abbd
Author: Michael Stefaniuc <mstefani at winehq.org>
Date: Wed Nov 27 00:49:53 2019 +0100
dmime: The group for a track in a segment cannot be zero.
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/dmime/segment.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/dlls/dmime/segment.c b/dlls/dmime/segment.c
index 3c0d4ac567..e3acafe979 100644
--- a/dlls/dmime/segment.c
+++ b/dlls/dmime/segment.c
@@ -235,7 +235,7 @@ static HRESULT WINAPI IDirectMusicSegment8Impl_GetTrackGroup(IDirectMusicSegment
}
static HRESULT WINAPI IDirectMusicSegment8Impl_InsertTrack(IDirectMusicSegment8 *iface,
- IDirectMusicTrack *pTrack, DWORD dwGroupBits)
+ IDirectMusicTrack *pTrack, DWORD group)
{
IDirectMusicSegment8Impl *This = impl_from_IDirectMusicSegment8(iface);
DWORD i = 0;
@@ -243,7 +243,10 @@ static HRESULT WINAPI IDirectMusicSegment8Impl_InsertTrack(IDirectMusicSegment8
LPDMUS_PRIVATE_SEGMENT_TRACK pIt = NULL;
LPDMUS_PRIVATE_SEGMENT_TRACK pNewSegTrack = NULL;
- TRACE("(%p, %p, %#x)\n", This, pTrack, dwGroupBits);
+ TRACE("(%p, %p, %#x)\n", This, pTrack, group);
+
+ if (!group)
+ return E_INVALIDARG;
LIST_FOR_EACH (pEntry, &This->Tracks) {
i++;
@@ -259,7 +262,7 @@ static HRESULT WINAPI IDirectMusicSegment8Impl_InsertTrack(IDirectMusicSegment8
if (NULL == pNewSegTrack)
return E_OUTOFMEMORY;
- pNewSegTrack->dwGroupBits = dwGroupBits;
+ pNewSegTrack->dwGroupBits = group;
pNewSegTrack->pTrack = pTrack;
IDirectMusicTrack_Init(pTrack, (IDirectMusicSegment *)iface);
IDirectMusicTrack_AddRef(pTrack);
More information about the wine-cvs
mailing list