Commit 31e52182 authored by Davide Beatrici's avatar Davide Beatrici Committed by Alexandre Julliard

winepulse: Fix crash when requesting exclusive mode with an unsupported format.

parent 797a8bb1
......@@ -2221,9 +2221,14 @@ static NTSTATUS pulse_is_format_supported(void *args)
break;
}
/* This driver does not support exclusive mode. */
if (exclusive && params->result == S_OK)
params->result = params->flow == eCapture ? AUDCLNT_E_UNSUPPORTED_FORMAT : AUDCLNT_E_EXCLUSIVE_MODE_NOT_ALLOWED;
if (exclusive) { /* This driver does not support exclusive mode. */
if (params->result == S_OK)
params->result = params->flow == eCapture ?
AUDCLNT_E_UNSUPPORTED_FORMAT :
AUDCLNT_E_EXCLUSIVE_MODE_NOT_ALLOWED;
else if (params->result == S_FALSE)
params->result = AUDCLNT_E_UNSUPPORTED_FORMAT;
}
return STATUS_SUCCESS;
}
......
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