winealsa.drv: Don't return garbage if can't find active channel.

oldstable
Dan Kegel 2008-01-13 22:51:24 -08:00 committed by Alexandre Julliard
parent 95fbd7f46b
commit 3c070b22ef
1 changed files with 6 additions and 0 deletions

View File

@ -985,6 +985,12 @@ static DWORD MIX_GetControlDetails(UINT wDevID, LPMIXERCONTROLDETAILS mctrld, DW
break;
}
if (chn > SND_MIXER_SCHN_LAST)
{
TRACE("can't find active channel\n");
return MMSYSERR_INVALPARAM; /* fixme: what's right error? */
}
mcdb->fValue = !ival;
TRACE("=> %s\n", mcdb->fValue ? "on" : "off");
return MMSYSERR_NOERROR;