mirror of
https://github.com/Tha14/toxic.git
synced 2024-12-23 12:23:26 +01:00
Merge pull request #283 from stal888/master
Destroy AL context before closing dhndl
This commit is contained in:
commit
7e49ba92b2
@ -323,9 +323,9 @@ DeviceError close_device(DeviceType type, uint32_t device_idx)
|
||||
alDeleteSources(1, &device->source);
|
||||
alDeleteBuffers(OPENAL_BUFS, device->buffers);
|
||||
|
||||
if ( !alcCloseDevice(device->dhndl) ) rc = de_AlError;
|
||||
alcMakeContextCurrent(NULL);
|
||||
if ( device->ctx ) alcDestroyContext(device->ctx);
|
||||
if ( !alcCloseDevice(device->dhndl) ) rc = de_AlError;
|
||||
}
|
||||
|
||||
free(device);
|
||||
|
Loading…
Reference in New Issue
Block a user