Add missing context checks

This commit is contained in:
Chris Robinson
2009-09-12 20:22:03 -07:00
parent d516f8c4bd
commit f9d228c30a
2 changed files with 22 additions and 0 deletions
+11
View File
@@ -43,6 +43,7 @@ ALvoid AL_APIENTRY alGenEffects(ALsizei n, ALuint *effects)
ALsizei i;
Context = GetContextSuspended();
if(!Context) return;
if (n > 0)
{
@@ -89,6 +90,7 @@ ALvoid AL_APIENTRY alDeleteEffects(ALsizei n, ALuint *effects)
ALsizei i;
Context = GetContextSuspended();
if(!Context) return;
if (n >= 0)
{
@@ -145,6 +147,7 @@ ALboolean AL_APIENTRY alIsEffect(ALuint effect)
ALeffect *list;
Context = GetContextSuspended();
if(!Context) return AL_FALSE;
list = Context->Device->EffectList;
while(list && list->effect != effect)
@@ -160,6 +163,7 @@ ALvoid AL_APIENTRY alEffecti(ALuint effect, ALenum param, ALint iValue)
ALCcontext *Context;
Context = GetContextSuspended();
if(!Context) return;
if (effect && alIsEffect(effect))
{
@@ -234,6 +238,7 @@ ALvoid AL_APIENTRY alEffectiv(ALuint effect, ALenum param, ALint *piValues)
ALCcontext *Context;
Context = GetContextSuspended();
if(!Context) return;
if (effect && alIsEffect(effect))
{
@@ -292,6 +297,7 @@ ALvoid AL_APIENTRY alEffectf(ALuint effect, ALenum param, ALfloat flValue)
ALCcontext *Context;
Context = GetContextSuspended();
if(!Context) return;
if (effect && alIsEffect(effect))
{
@@ -628,6 +634,7 @@ ALvoid AL_APIENTRY alEffectfv(ALuint effect, ALenum param, ALfloat *pflValues)
ALCcontext *Context;
Context = GetContextSuspended();
if(!Context) return;
if (effect && alIsEffect(effect))
{
@@ -741,6 +748,7 @@ ALvoid AL_APIENTRY alGetEffecti(ALuint effect, ALenum param, ALint *piValue)
ALCcontext *Context;
Context = GetContextSuspended();
if(!Context) return;
if (effect && alIsEffect(effect))
{
@@ -799,6 +807,7 @@ ALvoid AL_APIENTRY alGetEffectiv(ALuint effect, ALenum param, ALint *piValues)
ALCcontext *Context;
Context = GetContextSuspended();
if(!Context) return;
if (effect && alIsEffect(effect))
{
@@ -857,6 +866,7 @@ ALvoid AL_APIENTRY alGetEffectf(ALuint effect, ALenum param, ALfloat *pflValue)
ALCcontext *Context;
Context = GetContextSuspended();
if(!Context) return;
if (effect && alIsEffect(effect))
{
@@ -1051,6 +1061,7 @@ ALvoid AL_APIENTRY alGetEffectfv(ALuint effect, ALenum param, ALfloat *pflValues
ALCcontext *Context;
Context = GetContextSuspended();
if(!Context) return;
if (effect && alIsEffect(effect))
{
+11
View File
@@ -39,6 +39,7 @@ ALvoid AL_APIENTRY alGenFilters(ALsizei n, ALuint *filters)
ALsizei i;
Context = GetContextSuspended();
if(!Context) return;
if (n > 0)
{
@@ -85,6 +86,7 @@ ALvoid AL_APIENTRY alDeleteFilters(ALsizei n, ALuint *filters)
ALsizei i;
Context = GetContextSuspended();
if(!Context) return;
if (n >= 0)
{
@@ -141,6 +143,7 @@ ALboolean AL_APIENTRY alIsFilter(ALuint filter)
ALfilter *list;
Context = GetContextSuspended();
if(!Context) return AL_FALSE;
list = Context->Device->FilterList;
while(list && list->filter != filter)
@@ -156,6 +159,7 @@ ALvoid AL_APIENTRY alFilteri(ALuint filter, ALenum param, ALint iValue)
ALCcontext *Context;
Context = GetContextSuspended();
if(!Context) return;
if (filter && alIsFilter(filter))
{
@@ -187,6 +191,7 @@ ALvoid AL_APIENTRY alFilteriv(ALuint filter, ALenum param, ALint *piValues)
ALCcontext *Context;
Context = GetContextSuspended();
if(!Context) return;
if (filter && alIsFilter(filter))
{
@@ -212,6 +217,7 @@ ALvoid AL_APIENTRY alFilterf(ALuint filter, ALenum param, ALfloat flValue)
ALCcontext *Context;
Context = GetContextSuspended();
if(!Context) return;
if (filter && alIsFilter(filter))
{
@@ -258,6 +264,7 @@ ALvoid AL_APIENTRY alFilterfv(ALuint filter, ALenum param, ALfloat *pflValues)
ALCcontext *Context;
Context = GetContextSuspended();
if(!Context) return;
if (filter && alIsFilter(filter))
{
@@ -279,6 +286,7 @@ ALvoid AL_APIENTRY alGetFilteri(ALuint filter, ALenum param, ALint *piValue)
ALCcontext *Context;
Context = GetContextSuspended();
if(!Context) return;
if (filter && alIsFilter(filter))
{
@@ -306,6 +314,7 @@ ALvoid AL_APIENTRY alGetFilteriv(ALuint filter, ALenum param, ALint *piValues)
ALCcontext *Context;
Context = GetContextSuspended();
if(!Context) return;
if (filter && alIsFilter(filter))
{
@@ -331,6 +340,7 @@ ALvoid AL_APIENTRY alGetFilterf(ALuint filter, ALenum param, ALfloat *pflValue)
ALCcontext *Context;
Context = GetContextSuspended();
if(!Context) return;
if (filter && alIsFilter(filter))
{
@@ -371,6 +381,7 @@ ALvoid AL_APIENTRY alGetFilterfv(ALuint filter, ALenum param, ALfloat *pflValues
ALCcontext *Context;
Context = GetContextSuspended();
if(!Context) return;
if (filter && alIsFilter(filter))
{