Module: wine Branch: master Commit: 0d17228ff95a38d4d3e6714183fc8d6cf2dfebe1 URL: http://source.winehq.org/git/wine.git/?a=commit;h=0d17228ff95a38d4d3e6714183...
Author: Bruno Jesus 00cpxxx@gmail.com Date: Mon Sep 12 16:07:56 2016 -0300
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
---
dlls/dinput/effect_linuxinput.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/dlls/dinput/effect_linuxinput.c b/dlls/dinput/effect_linuxinput.c index fe3334a..9205c9c 100644 --- a/dlls/dinput/effect_linuxinput.c +++ b/dlls/dinput/effect_linuxinput.c @@ -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