Commit 2cc258f6 authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard

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

parent a03cc957
...@@ -1050,8 +1050,8 @@ static DWORD modPrepare(WORD wDevID, LPMIDIHDR lpMidiHdr, DWORD dwSize) ...@@ -1050,8 +1050,8 @@ static DWORD modPrepare(WORD wDevID, LPMIDIHDR lpMidiHdr, DWORD dwSize)
if (dwSize < sizeof(MIDIHDR) || lpMidiHdr == 0 || if (dwSize < sizeof(MIDIHDR) || lpMidiHdr == 0 ||
lpMidiHdr->lpData == 0 || (lpMidiHdr->dwFlags & MHDR_INQUEUE) != 0 || lpMidiHdr->lpData == 0 || (lpMidiHdr->dwFlags & MHDR_INQUEUE) != 0 ||
lpMidiHdr->dwBufferLength >= 0x10000ul) { lpMidiHdr->dwBufferLength >= 0x10000ul) {
WARN("%p %p %08x %d/%d\n", lpMidiHdr, lpMidiHdr->lpData, WARN("%p %p %08x %d/%d\n", lpMidiHdr, lpMidiHdr ? lpMidiHdr->lpData : NULL,
lpMidiHdr->dwFlags, sizeof(MIDIHDR), dwSize); lpMidiHdr ? lpMidiHdr->dwFlags : 0, sizeof(MIDIHDR), dwSize);
return MMSYSERR_INVALPARAM; return MMSYSERR_INVALPARAM;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment