diff options
author | Chris Robinson <[email protected]> | 2019-10-08 21:52:08 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2019-10-08 21:55:03 -0700 |
commit | 963580c2d503eab7c6d8f60a367498ff103bfa3e (patch) | |
tree | ca30803987383fd8bbf413ee7fdd33898c97f2da /alc/backends/winmm.cpp | |
parent | 7726a06d26e59dc6a8e109af2e268de878c4f606 (diff) |
Never return null from CreateRingBuffer
Allocation failure would already throw a bad_alloc anyway, now a size overflow
throws an exception too.
Diffstat (limited to 'alc/backends/winmm.cpp')
-rw-r--r-- | alc/backends/winmm.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/alc/backends/winmm.cpp b/alc/backends/winmm.cpp index dde74304..c2ccbc05 100644 --- a/alc/backends/winmm.cpp +++ b/alc/backends/winmm.cpp @@ -519,7 +519,6 @@ void WinMMCapture::open(const ALCchar *name) CapturedDataSize = static_cast<ALuint>(maxz(CapturedDataSize, BufferSize*mWaveBuffer.size())); mRing = CreateRingBuffer(CapturedDataSize, mFormat.nBlockAlign, false); - if(!mRing) throw al::backend_exception{ALC_INVALID_VALUE, "Could not create ring buffer"}; al_free(mWaveBuffer[0].lpData); mWaveBuffer[0] = WAVEHDR{}; |