[PATCH 1/2] dinput: Handle NULL effect envelope before testing its parameters
Bruno Jesus
00cpxxx at gmail.com
Mon Sep 12 14:07:56 CDT 2016
Signed-off-by: Bruno Jesus <00cpxxx at gmail.com>
---
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
--
2.9.3
More information about the wine-patches
mailing list