aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALc.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2009-08-16 16:11:22 -0700
committerChris Robinson <[email protected]>2009-08-16 16:11:22 -0700
commit487f0dde7593144ceabd817306500465caf7602a (patch)
tree71057c6757bd13133ef7cd22e03b9f6e98d5f7da /Alc/ALc.c
parentc8f700930a08c2652c2fee312f1de20a14433af1 (diff)
Print source and auxiliary slot debug warnings from alcDestroyContext
Diffstat (limited to 'Alc/ALc.c')
-rw-r--r--Alc/ALc.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index a807ef47..1528c4e6 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -1174,8 +1174,20 @@ ALCAPI ALCvoid ALCAPIENTRY alcDestroyContext(ALCcontext *context)
// Lock context
SuspendContext(context);
- ReleaseALSources(context);
- ReleaseALAuxiliaryEffectSlots(context);
+ if(context->SourceCount > 0)
+ {
+#ifdef _DEBUG
+ AL_PRINT("alcDestroyContext(): deleting %d Source(s)\n", context->SourceCount);
+#endif
+ ReleaseALSources(context);
+ }
+ if(context->AuxiliaryEffectSlotCount > 0)
+ {
+#ifdef _DEBUG
+ AL_PRINT("alcDestroyContext(): deleting %d AuxiliaryEffectSlot(s)\n", context->AuxiliaryEffectSlotCount);
+#endif
+ ReleaseALAuxiliaryEffectSlots(context);
+ }
context->Device->Context = NULL;