aboutsummaryrefslogtreecommitdiffstats
path: root/alc/backends/wasapi.cpp
diff options
context:
space:
mode:
authorChris Robinson <chris.kcat@gmail.com>2019-10-08 21:52:08 -0700
committerChris Robinson <chris.kcat@gmail.com>2019-10-08 21:55:03 -0700
commit963580c2d503eab7c6d8f60a367498ff103bfa3e (patch)
treeca30803987383fd8bbf413ee7fdd33898c97f2da /alc/backends/wasapi.cpp
parent7726a06d26e59dc6a8e109af2e268de878c4f606 (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/wasapi.cpp')
-rw-r--r--alc/backends/wasapi.cpp5
1 files changed, 0 insertions, 5 deletions
diff --git a/alc/backends/wasapi.cpp b/alc/backends/wasapi.cpp
index 2c4fe130..37a547af 100644
--- a/alc/backends/wasapi.cpp
+++ b/alc/backends/wasapi.cpp
@@ -1601,11 +1601,6 @@ HRESULT WasapiCapture::resetProxy()
buffer_len = maxu(mDevice->BufferSize, buffer_len);
mRing = CreateRingBuffer(buffer_len, mDevice->frameSizeFromFmt(), false);
- if(!mRing)
- {
- ERR("Failed to allocate capture ring buffer\n");
- return E_OUTOFMEMORY;
- }
hr = mClient->SetEventHandle(mNotifyEvent);
if(FAILED(hr))