diff options
author | Chris Robinson <[email protected]> | 2009-09-12 20:22:03 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2009-09-12 20:22:03 -0700 |
commit | f9d228c30a04e0b98620d9cc7d3df17562dc7b99 (patch) | |
tree | 9ead5d22eb5b3a0fee115d61873d27c69b22388c | |
parent | d516f8c4bdc27754efce2fac5f500f8d238492c2 (diff) |
Add missing context checks
-rw-r--r-- | OpenAL32/alEffect.c | 11 | ||||
-rw-r--r-- | OpenAL32/alFilter.c | 11 |
2 files changed, 22 insertions, 0 deletions
diff --git a/OpenAL32/alEffect.c b/OpenAL32/alEffect.c index 0c2d129f..14c92e2a 100644 --- a/OpenAL32/alEffect.c +++ b/OpenAL32/alEffect.c @@ -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)) { diff --git a/OpenAL32/alFilter.c b/OpenAL32/alFilter.c index d2b3ff62..318e256d 100644 --- a/OpenAL32/alFilter.c +++ b/OpenAL32/alFilter.c @@ -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)) { |