aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALc.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2008-01-14 10:42:11 -0800
committerChris Robinson <[email protected]>2008-01-14 10:42:11 -0800
commita552e32a9aa878c342582b2b10eecb29eaa00582 (patch)
tree44191afbcc411731781f339b84b93ce1d7241b2b /Alc/ALc.c
parent29c6238b52e0733f7fbd19853f323ea9ee245064 (diff)
Destroy context if closing a device with one
Diffstat (limited to 'Alc/ALc.c')
-rw-r--r--Alc/ALc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index 6a4e27df..c8d5f0bc 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -1224,6 +1224,8 @@ ALCAPI ALCboolean ALCAPIENTRY alcCloseDevice(ALCdevice *pDevice)
ProcessContext(NULL);
+ if(pDevice->Context)
+ alcDestroyContext(pDevice->Context);
ALCdevice_ClosePlayback(pDevice);
//Release device structure