aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/alFilter.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2010-03-16 19:14:05 -0700
committerChris Robinson <[email protected]>2010-03-16 19:14:05 -0700
commit49321961e85b92cb04ce51baf741a6e34c6a6388 (patch)
tree668f88e4b471fcb28a54b2dfaad9711725b99b3e /OpenAL32/alFilter.c
parent65f43637ceeaf4042c5fb5e02cb2fb2ccc496a64 (diff)
Effect and filter ID 0 is valid
Diffstat (limited to 'OpenAL32/alFilter.c')
-rw-r--r--OpenAL32/alFilter.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/OpenAL32/alFilter.c b/OpenAL32/alFilter.c
index 8b3097d3..75385418 100644
--- a/OpenAL32/alFilter.c
+++ b/OpenAL32/alFilter.c
@@ -140,13 +140,15 @@ ALvoid AL_APIENTRY alDeleteFilters(ALsizei n, ALuint *filters)
ALboolean AL_APIENTRY alIsFilter(ALuint filter)
{
ALCcontext *Context;
- ALboolean result;
+ ALboolean result = AL_TRUE;
Context = GetContextSuspended();
if(!Context) return AL_FALSE;
- result = (VerifyFilter(Context->Device->FilterList, filter) ? AL_TRUE :
- AL_FALSE);
+ if(filter)
+ result = (VerifyFilter(Context->Device->FilterList, filter) ?
+ AL_TRUE : AL_FALSE);
+
ProcessContext(Context);
return result;