winmm: Only fill in the MIXERLINEA struct if the call to mixerGetLineInfoW succeeds.

This commit is contained in:
Huw Davies 2008-07-18 12:05:52 +01:00 committed by Alexandre Julliard
parent b2be840e47
commit 5798b95a51
1 changed files with 23 additions and 21 deletions

View File

@ -652,6 +652,8 @@ UINT WINAPI mixerGetLineInfoA(HMIXEROBJ hmix, LPMIXERLINEA lpmliA,
ret = mixerGetLineInfoW(hmix, &mliW, fdwInfo); ret = mixerGetLineInfoW(hmix, &mliW, fdwInfo);
if(ret == MMSYSERR_NOERROR)
{
lpmliA->dwDestination = mliW.dwDestination; lpmliA->dwDestination = mliW.dwDestination;
lpmliA->dwSource = mliW.dwSource; lpmliA->dwSource = mliW.dwSource;
lpmliA->dwLineID = mliW.dwLineID; lpmliA->dwLineID = mliW.dwLineID;
@ -672,7 +674,7 @@ UINT WINAPI mixerGetLineInfoA(HMIXEROBJ hmix, LPMIXERLINEA lpmliA,
lpmliA->Target.vDriverVersion = mliW.Target.vDriverVersion; lpmliA->Target.vDriverVersion = mliW.Target.vDriverVersion;
WideCharToMultiByte( CP_ACP, 0, mliW.Target.szPname, -1, lpmliA->Target.szPname, WideCharToMultiByte( CP_ACP, 0, mliW.Target.szPname, -1, lpmliA->Target.szPname,
sizeof(lpmliA->Target.szPname), NULL, NULL ); sizeof(lpmliA->Target.szPname), NULL, NULL );
}
return ret; return ret;
} }