diff options
author | Chris Robinson <[email protected]> | 2010-08-08 02:48:28 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2010-08-08 02:48:28 -0700 |
commit | f1924fa7eac0e41753d604d8ba3b7f69789e95f8 (patch) | |
tree | 74d120dd76aba24cc687230a1de321b44eb0e61f | |
parent | df822513fa9656f1a0fea1ef3f895f7ec5cee48c (diff) |
Decrement context count when it's removed from the list
-rw-r--r-- | Alc/ALc.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1712,15 +1712,15 @@ ALC_API ALCvoid ALC_APIENTRY alcDestroyContext(ALCcontext *context) if(context == GlobalContext) GlobalContext = NULL; - for(i = 0;i < Device->NumContexts-1;i++) + for(i = 0;i < Device->NumContexts;i++) { if(Device->Contexts[i] == context) { Device->Contexts[i] = Device->Contexts[Device->NumContexts-1]; + Device->NumContexts--; break; } } - Device->NumContexts--; // Lock context SuspendContext(context); |