winmm: Handle NULL parameter in joyGetPos/joyGetPosEx.

This commit is contained in:
Bruno Jesus 2014-12-11 02:53:26 -02:00 committed by Alexandre Julliard
parent 1005f3a6fa
commit 45f46bd359
1 changed files with 2 additions and 0 deletions

View File

@ -219,6 +219,7 @@ MMRESULT WINAPI DECLSPEC_HOTPATCH joyGetPosEx(UINT wID, LPJOYINFOEX lpInfo)
{
TRACE("(%d, %p);\n", wID, lpInfo);
if (!lpInfo) return MMSYSERR_INVALPARAM;
if (wID >= MAXJOYSTICK) return JOYERR_PARMS;
if (!JOY_LoadDriver(wID)) return MMSYSERR_NODRIVER;
@ -244,6 +245,7 @@ MMRESULT WINAPI joyGetPos(UINT wID, LPJOYINFO lpInfo)
{
TRACE("(%d, %p);\n", wID, lpInfo);
if (!lpInfo) return MMSYSERR_INVALPARAM;
if (wID >= MAXJOYSTICK) return JOYERR_PARMS;
if (!JOY_LoadDriver(wID)) return MMSYSERR_NODRIVER;