diff options
author | smatz <smatz@openttd.org> | 2009-02-24 20:59:17 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2009-02-24 20:59:17 +0000 |
commit | d73c1fa7bfed01a187e14c4d86cde70e7121c51b (patch) | |
tree | 50574d6b6befd846433d33e7a7a619e719b57d0a /src/sound | |
parent | 8beca127ddf8f97b76c4bd3491ead1f6954b115d (diff) | |
download | openttd-d73c1fa7bfed01a187e14c4d86cde70e7121c51b.tar.xz |
(svn r15568) -Cleanup: *allocT/AllocaM doesn't return NULL when allocating fails
Diffstat (limited to 'src/sound')
-rw-r--r-- | src/sound/win32_s.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/sound/win32_s.cpp b/src/sound/win32_s.cpp index 1bb0e9d53..3a5419495 100644 --- a/src/sound/win32_s.cpp +++ b/src/sound/win32_s.cpp @@ -22,8 +22,7 @@ static void PrepareHeader(WAVEHDR *hdr) hdr->dwBufferLength = _bufsize * 4; hdr->dwFlags = 0; hdr->lpData = MallocT<char>(_bufsize * 4); - if (hdr->lpData == NULL || - waveOutPrepareHeader(_waveout, hdr, sizeof(WAVEHDR)) != MMSYSERR_NOERROR) + if (waveOutPrepareHeader(_waveout, hdr, sizeof(WAVEHDR)) != MMSYSERR_NOERROR) usererror("waveOutPrepareHeader failed"); } |