Check for NULL ptr in midiStreamOut.

This commit is contained in:
Eric Pouech 2002-05-29 00:31:00 +00:00 committed by Alexandre Julliard
parent f87d30edc1
commit c22256a01c
1 changed files with 4 additions and 2 deletions

View File

@ -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;
}