winealsa: Don't dereference a potentially NULL value in the WARN statement (Coverity 93).

This commit is contained in:
Aric Stewart 2008-10-04 13:03:17 -05:00 committed by Alexandre Julliard
parent a03cc957e1
commit 2cc258f6c9

View file

@ -1050,8 +1050,8 @@ static DWORD modPrepare(WORD wDevID, LPMIDIHDR lpMidiHdr, DWORD dwSize)
if (dwSize < sizeof(MIDIHDR) || lpMidiHdr == 0 ||
lpMidiHdr->lpData == 0 || (lpMidiHdr->dwFlags & MHDR_INQUEUE) != 0 ||
lpMidiHdr->dwBufferLength >= 0x10000ul) {
WARN("%p %p %08x %d/%d\n", lpMidiHdr, lpMidiHdr->lpData,
lpMidiHdr->dwFlags, sizeof(MIDIHDR), dwSize);
WARN("%p %p %08x %d/%d\n", lpMidiHdr, lpMidiHdr ? lpMidiHdr->lpData : NULL,
lpMidiHdr ? lpMidiHdr->dwFlags : 0, sizeof(MIDIHDR), dwSize);
return MMSYSERR_INVALPARAM;
}