aboutsummaryrefslogtreecommitdiffstats
path: root/alc/alc.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2020-04-28 07:01:30 -0700
committerChris Robinson <[email protected]>2020-04-28 07:01:30 -0700
commit187477db03aab952543582b2c5a6bafd970dbac7 (patch)
tree03e29fdb44979e8eb2d3fd16992ca51e7e68a332 /alc/alc.cpp
parentb4435cd0534699a9ba6f2b2a8e060f38e0c36c9c (diff)
Properly return on error
Diffstat (limited to 'alc/alc.cpp')
-rw-r--r--alc/alc.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/alc/alc.cpp b/alc/alc.cpp
index 51e8d2da..4db228d6 100644
--- a/alc/alc.cpp
+++ b/alc/alc.cpp
@@ -3212,8 +3212,11 @@ START_API_FUNC
{
DeviceRef dev{VerifyDevice(device)};
if(size <= 0 || values == nullptr)
+ {
alcSetError(dev.get(), ALC_INVALID_VALUE);
- else if(!dev || dev->Type == Capture)
+ return;
+ }
+ if(!dev || dev->Type == Capture)
{
auto ivals = al::vector<int>(static_cast<ALuint>(size));
size_t got{GetIntegerv(dev.get(), pname, ivals)};