diff options
author | Chris Robinson <[email protected]> | 2009-08-16 14:09:23 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2009-08-16 14:09:23 -0700 |
commit | 462f27c129454b71179e0ebce366f3b8d7956da6 (patch) | |
tree | 7d726be69bdac1c6ed6354c52057d747be9a9359 /OpenAL32/alError.c | |
parent | 2d1191697ae5a770b7e0b57a612271ef70b6b890 (diff) |
Use a function to retrieve the current context in an already-locked state
This should help prevent race-conditions with a context being destroyed between
breing retrieved and locked
Diffstat (limited to 'OpenAL32/alError.c')
-rw-r--r-- | OpenAL32/alError.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/OpenAL32/alError.c b/OpenAL32/alError.c index a7ed84a2..0ffb5e6b 100644 --- a/OpenAL32/alError.c +++ b/OpenAL32/alError.c @@ -29,8 +29,7 @@ ALAPI ALenum ALAPIENTRY alGetError(ALvoid) ALCcontext *Context; ALenum errorCode; - Context = alcGetCurrentContext(); - SuspendContext(Context); + Context = GetContextSuspended(); if (Context) { @@ -49,8 +48,7 @@ ALvoid alSetError(ALenum errorCode) { ALCcontext *Context; - Context=alcGetCurrentContext(); - SuspendContext(Context); + Context=GetContextSuspended(); if (Context && Context->LastError == AL_NO_ERROR) Context->LastError = errorCode; |