Check for NULL ptr in midiStreamOut.
This commit is contained in:
parent
f87d30edc1
commit
c22256a01c
|
@ -3469,10 +3469,12 @@ MMRESULT WINAPI midiStreamOut(HMIDISTRM hMidiStrm, LPMIDIHDR lpMidiHdr,
|
||||||
|
|
||||||
if (!MMSYSTEM_GetMidiStream(hMidiStrm, &lpMidiStrm, NULL)) {
|
if (!MMSYSTEM_GetMidiStream(hMidiStrm, &lpMidiStrm, NULL)) {
|
||||||
ret = MMSYSERR_INVALHANDLE;
|
ret = MMSYSERR_INVALHANDLE;
|
||||||
|
} else if (!lpMidiHdr) {
|
||||||
|
ret = MMSYSERR_INVALPARAM;
|
||||||
} else {
|
} else {
|
||||||
if (!PostThreadMessageA(lpMidiStrm->dwThreadID,
|
if (!PostThreadMessageA(lpMidiStrm->dwThreadID,
|
||||||
WINE_MSM_HEADER, cbMidiHdr,
|
WINE_MSM_HEADER, cbMidiHdr,
|
||||||
(DWORD)lpMidiHdr)) {
|
(DWORD)lpMidiHdr)) {
|
||||||
WARN("bad PostThreadMessageA\n");
|
WARN("bad PostThreadMessageA\n");
|
||||||
ret = MMSYSERR_ERROR;
|
ret = MMSYSERR_ERROR;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue