dinput: Handle NULL effect envelope before testing its parameters.

Signed-off-by: Bruno Jesus <00cpxxx@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Bruno Jesus 2016-09-12 16:07:56 -03:00 committed by Alexandre Julliard
parent c1bc25dd38
commit 0d17228ff9
1 changed files with 6 additions and 3 deletions

View File

@ -585,9 +585,12 @@ static HRESULT WINAPI LinuxInputEffectImpl_SetParameters(
env->fade_length = 0;
env->fade_level = 0;
}
else if(peff->lpEnvelope->dwAttackTime || peff->lpEnvelope->dwAttackLevel ||
peff->lpEnvelope->dwFadeTime || peff->lpEnvelope->dwFadeLevel)
WARN("Ignoring dinput envelope not supported in the linux effect\n");
else if(peff->lpEnvelope)
{
if(peff->lpEnvelope->dwAttackTime || peff->lpEnvelope->dwAttackLevel ||
peff->lpEnvelope->dwFadeTime || peff->lpEnvelope->dwFadeLevel)
WARN("Ignoring dinput envelope not supported in the linux effect\n");
}
}
/* Gain and Sample Period settings are not supported by the linux