Commit 1da4b59e authored by Alex Villacís Lasso's avatar Alex Villacís Lasso Committed by Alexandre Julliard

msacm: Fix acmMetrics(ACM_METRIC_DRIVER_PRIORITY) return on error.

parent 9a577e5e
...@@ -224,12 +224,15 @@ MMRESULT WINAPI acmMetrics(HACMOBJ hao, UINT uMetric, LPVOID pMetric) ...@@ -224,12 +224,15 @@ MMRESULT WINAPI acmMetrics(HACMOBJ hao, UINT uMetric, LPVOID pMetric)
case ACM_METRIC_DRIVER_PRIORITY: case ACM_METRIC_DRIVER_PRIORITY:
/* Return current list position of driver */ /* Return current list position of driver */
if (!hao) return MMSYSERR_INVALHANDLE; if (!hao) return MMSYSERR_INVALHANDLE;
if (!pMetric) return MMSYSERR_INVALPARAM;
mmr = MMSYSERR_INVALHANDLE; mmr = MMSYSERR_INVALHANDLE;
for (i = 1, padid = MSACM_pFirstACMDriverID; padid; i++, padid = padid->pNextACMDriverID) { for (i = 1, padid = MSACM_pFirstACMDriverID; padid; i++, padid = padid->pNextACMDriverID) {
if (padid == (PWINE_ACMDRIVERID)hao) { if (padid == (PWINE_ACMDRIVERID)hao) {
*(LPDWORD)pMetric = i; if (pMetric) {
mmr = MMSYSERR_NOERROR; *(LPDWORD)pMetric = i;
mmr = MMSYSERR_NOERROR;
} else {
mmr = MMSYSERR_INVALPARAM;
}
break; break;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment