Skip to content

Commit

Permalink
Set error for alcGetIntegerv(NULL, ALC_CONNECTED), per ALC_EXT_DISCON…
Browse files Browse the repository at this point in the history
…NECT spec.
  • Loading branch information
icculus committed Apr 8, 2018
1 parent 51d79a0 commit 6da27cc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion mojoal.c
Expand Up @@ -1117,7 +1117,12 @@ void alcGetIntegerv(ALCdevice *device, ALCenum param, ALCsizei size, ALCint *val
return;

case ALC_CONNECTED:
*values = (ALCint) device->connected ? ALC_TRUE : ALC_FALSE;
if (device) {
*values = (ALCint) device->connected ? ALC_TRUE : ALC_FALSE;
} else {
*values = 0;
set_alc_error(device, ALC_INVALID_DEVICE);
}
return;

case ALC_ATTRIBUTES_SIZE:
Expand Down

0 comments on commit 6da27cc

Please sign in to comment.