Only set an error condition if no other error is set

This commit is contained in:
Chris Robinson
2007-11-22 06:51:47 -08:00
parent f43528035a
commit 6d12dcda10
+3 -7
View File
@@ -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);
}