diff options
author | Chris Robinson <[email protected]> | 2007-11-22 06:51:47 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2007-11-22 06:51:47 -0800 |
commit | 6d12dcda10b76b5a2daa2e18de3a5dc178ff4a36 (patch) | |
tree | 3e9ebf8f5a2fe263bbdbea341f6b746a8d7f7de3 /OpenAL32/alError.c | |
parent | f43528035a5b0953a3e049e8a83cfc5dc994283f (diff) |
Only set an error condition if no other error is set
Diffstat (limited to 'OpenAL32/alError.c')
-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); } |