aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALc.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2013-06-04 17:36:54 -0700
committerChris Robinson <[email protected]>2013-06-04 17:36:54 -0700
commit0e0f70b2888c23debeefd80603f8c6f0c1ad4880 (patch)
tree2d47fcfb70f53617bd7fdb54639f2e3315f853d7 /Alc/ALc.c
parent7257aa3ed2c1df75f685ae1fa3dec0316ce32cbf (diff)
Avoid a NULL dereference
Diffstat (limited to 'Alc/ALc.c')
-rw-r--r--Alc/ALc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index cd408f89..396692ab 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -3139,7 +3139,7 @@ ALC_API void ALC_APIENTRY alcCaptureStop(ALCdevice *device)
ALC_API void ALC_APIENTRY alcCaptureSamples(ALCdevice *device, ALCvoid *buffer, ALCsizei samples)
{
- if(!(device=VerifyDevice(device)) && device->Type != Capture)
+ if(!(device=VerifyDevice(device)) || device->Type != Capture)
alcSetError(device, ALC_INVALID_DEVICE);
else
{