From 6d12dcda10b76b5a2daa2e18de3a5dc178ff4a36 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Thu, 22 Nov 2007 06:51:47 -0800 Subject: Only set an error condition if no other error is set --- OpenAL32/alError.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'OpenAL32/alError.c') 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); } -- cgit v1.2.3