diff options
-rw-r--r-- | OpenAL32/alError.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/OpenAL32/alError.c b/OpenAL32/alError.c index df5c16e4..d159b75c 100644 --- a/OpenAL32/alError.c +++ b/OpenAL32/alError.c @@ -36,9 +36,7 @@ ALAPI ALenum ALAPIENTRY alGetError(ALvoid) Context->LastError = AL_NO_ERROR; } else - { errorCode = AL_INVALID_OPERATION; - } ProcessContext(Context); @@ -52,10 +50,8 @@ ALvoid alSetError(ALenum errorCode) Context=alcGetCurrentContext(); SuspendContext(Context); - if (Context) - { - Context->LastError=errorCode; - } - + if (Context && Context->LastError == AL_NO_ERROR) + Context->LastError = errorCode; + ProcessContext(Context); } |