Don't return error from alGetError() if there is no context
parent
b8cadf5d51
commit
5136d4d204
|
@ -356,7 +356,7 @@ static ALCuint g_ulContextCount = 0;
|
|||
// Thread-local current context
|
||||
static tls_type LocalContext;
|
||||
// Process-wide current context
|
||||
static ALCcontext *GlobalContext;
|
||||
static ALCcontext *GlobalContext = NULL;
|
||||
|
||||
// Context Error
|
||||
static ALCenum g_eLastNullDeviceError = ALC_NO_ERROR;
|
||||
|
|
|
@ -30,7 +30,9 @@ AL_API ALenum AL_APIENTRY alGetError(ALvoid)
|
|||
ALenum errorCode;
|
||||
|
||||
Context = GetContextSuspended();
|
||||
if(!Context) return AL_INVALID_OPERATION;
|
||||
if(!Context) {
|
||||
return AL_NO_ERROR;
|
||||
}
|
||||
|
||||
errorCode = Context->LastError;
|
||||
Context->LastError = AL_NO_ERROR;
|
||||
|
|
Loading…
Reference in New Issue