msacm: Fix acmMetrics(ACM_METRIC_DRIVER_PRIORITY) return on error.

This commit is contained in:
Alex Villacís Lasso 2006-01-17 15:59:59 +01:00 committed by Alexandre Julliard
parent 9a577e5e41
commit 1da4b59e33
1 changed files with 6 additions and 3 deletions

View File

@ -224,12 +224,15 @@ MMRESULT WINAPI acmMetrics(HACMOBJ hao, UINT uMetric, LPVOID pMetric)
case ACM_METRIC_DRIVER_PRIORITY:
/* Return current list position of driver */
if (!hao) return MMSYSERR_INVALHANDLE;
if (!pMetric) return MMSYSERR_INVALPARAM;
mmr = MMSYSERR_INVALHANDLE;
for (i = 1, padid = MSACM_pFirstACMDriverID; padid; i++, padid = padid->pNextACMDriverID) {
if (padid == (PWINE_ACMDRIVERID)hao) {
*(LPDWORD)pMetric = i;
mmr = MMSYSERR_NOERROR;
if (pMetric) {
*(LPDWORD)pMetric = i;
mmr = MMSYSERR_NOERROR;
} else {
mmr = MMSYSERR_INVALPARAM;
}
break;
}
}