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)) {
|
||||
ret = MMSYSERR_INVALHANDLE;
|
||||
} else if (!lpMidiHdr) {
|
||||
ret = MMSYSERR_INVALPARAM;
|
||||
} else {
|
||||
if (!PostThreadMessageA(lpMidiStrm->dwThreadID,
|
||||
WINE_MSM_HEADER, cbMidiHdr,
|
||||
(DWORD)lpMidiHdr)) {
|
||||
WINE_MSM_HEADER, cbMidiHdr,
|
||||
(DWORD)lpMidiHdr)) {
|
||||
WARN("bad PostThreadMessageA\n");
|
||||
ret = MMSYSERR_ERROR;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue