Don't allow properties on effect and filter name 0

This commit is contained in:
Chris Robinson 2007-12-18 18:39:08 -08:00
parent 7f55372727
commit 4cc64fa9a8
2 changed files with 16 additions and 28 deletions

View File

@ -156,7 +156,7 @@ AL_API ALvoid AL_APIENTRY alEffecti(ALuint effect, ALenum param, ALint iValue)
Context = alcGetCurrentContext();
SuspendContext(Context);
if (alIsEffect(effect))
if (effect && alIsEffect(effect))
{
ALeffect *ALEffect = (ALeffect*)ALTHUNK_LOOKUPENTRY(effect);
@ -187,7 +187,7 @@ AL_API ALvoid AL_APIENTRY alEffectiv(ALuint effect, ALenum param, ALint *piValue
Context = alcGetCurrentContext();
SuspendContext(Context);
if (alIsEffect(effect))
if (effect && alIsEffect(effect))
{
switch(param)
{
@ -215,7 +215,7 @@ AL_API ALvoid AL_APIENTRY alEffectf(ALuint effect, ALenum param, ALfloat flValue
Context = alcGetCurrentContext();
SuspendContext(Context);
if (alIsEffect(effect))
if (effect && alIsEffect(effect))
{
switch(param)
{
@ -239,7 +239,7 @@ AL_API ALvoid AL_APIENTRY alEffectfv(ALuint effect, ALenum param, ALfloat *pflVa
Context = alcGetCurrentContext();
SuspendContext(Context);
if (alIsEffect(effect))
if (effect && alIsEffect(effect))
{
switch(param)
{
@ -261,7 +261,7 @@ AL_API ALvoid AL_APIENTRY alGetEffecti(ALuint effect, ALenum param, ALint *piVal
Context = alcGetCurrentContext();
SuspendContext(Context);
if (alIsEffect(effect))
if (effect && alIsEffect(effect))
{
ALeffect *ALEffect = (ALeffect*)ALTHUNK_LOOKUPENTRY(effect);
@ -289,7 +289,7 @@ AL_API ALvoid AL_APIENTRY alGetEffectiv(ALuint effect, ALenum param, ALint *piVa
Context = alcGetCurrentContext();
SuspendContext(Context);
if (alIsEffect(effect))
if (effect && alIsEffect(effect))
{
switch(param)
{
@ -317,7 +317,7 @@ AL_API ALvoid AL_APIENTRY alGetEffectf(ALuint effect, ALenum param, ALfloat *pfl
Context = alcGetCurrentContext();
SuspendContext(Context);
if (alIsEffect(effect))
if (effect && alIsEffect(effect))
{
switch(param)
{
@ -341,7 +341,7 @@ AL_API ALvoid AL_APIENTRY alGetEffectfv(ALuint effect, ALenum param, ALfloat *pf
Context = alcGetCurrentContext();
SuspendContext(Context);
if (alIsEffect(effect))
if (effect && alIsEffect(effect))
{
switch(param)
{

View File

@ -153,12 +153,10 @@ AL_API ALvoid AL_APIENTRY alFilteri(ALuint filter, ALenum param, ALint iValue)
{
ALCcontext *Context;
(void)iValue;
Context = alcGetCurrentContext();
SuspendContext(Context);
if (alIsFilter(filter))
if (filter && alIsFilter(filter))
{
ALfilter *ALFilter = (ALfilter*)ALTHUNK_LOOKUPENTRY(filter);
@ -187,12 +185,10 @@ AL_API ALvoid AL_APIENTRY alFilteriv(ALuint filter, ALenum param, ALint *piValue
{
ALCcontext *Context;
(void)piValues;
Context = alcGetCurrentContext();
SuspendContext(Context);
if (alIsFilter(filter))
if (filter && alIsFilter(filter))
{
switch(param)
{
@ -215,12 +211,10 @@ AL_API ALvoid AL_APIENTRY alFilterf(ALuint filter, ALenum param, ALfloat flValue
{
ALCcontext *Context;
(void)flValue;
Context = alcGetCurrentContext();
SuspendContext(Context);
if (alIsFilter(filter))
if (filter && alIsFilter(filter))
{
ALfilter *ALFilter = (ALfilter*)ALTHUNK_LOOKUPENTRY(filter);
@ -261,12 +255,10 @@ AL_API ALvoid AL_APIENTRY alFilterfv(ALuint filter, ALenum param, ALfloat *pflVa
{
ALCcontext *Context;
(void)pflValues;
Context = alcGetCurrentContext();
SuspendContext(Context);
if (alIsFilter(filter))
if (filter && alIsFilter(filter))
{
switch(param)
{
@ -295,7 +287,7 @@ AL_API ALvoid AL_APIENTRY alGetFilteri(ALuint filter, ALenum param, ALint *piVal
Context = alcGetCurrentContext();
SuspendContext(Context);
if (alIsFilter(filter))
if (filter && alIsFilter(filter))
{
switch(param)
{
@ -319,7 +311,7 @@ AL_API ALvoid AL_APIENTRY alGetFilteriv(ALuint filter, ALenum param, ALint *piVa
Context = alcGetCurrentContext();
SuspendContext(Context);
if (alIsFilter(filter))
if (filter && alIsFilter(filter))
{
switch(param)
{
@ -338,12 +330,10 @@ AL_API ALvoid AL_APIENTRY alGetFilterf(ALuint filter, ALenum param, ALfloat *pfl
{
ALCcontext *Context;
(void)pflValue;
Context = alcGetCurrentContext();
SuspendContext(Context);
if (alIsFilter(filter))
if (filter && alIsFilter(filter))
{
ALfilter *ALFilter = (ALfilter*)ALTHUNK_LOOKUPENTRY(filter);
@ -378,12 +368,10 @@ AL_API ALvoid AL_APIENTRY alGetFilterfv(ALuint filter, ALenum param, ALfloat *pf
{
ALCcontext *Context;
(void)pflValues;
Context = alcGetCurrentContext();
SuspendContext(Context);
if (alIsFilter(filter))
if (filter && alIsFilter(filter))
{
switch(param)
{