aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/alFilter.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2011-06-17 23:59:25 -0700
committerChris Robinson <[email protected]>2011-06-17 23:59:25 -0700
commit0d39ac652889bc2ecea0286fe24fcdcd6c04995e (patch)
treed21b0a88ed08e2901c5e5a6049705fb64a9d8247 /OpenAL32/alFilter.c
parent157e1394d6d3d32630d287a9725396ec4dff24bb (diff)
Allow alThunkAddEntry to return a proper error
Diffstat (limited to 'OpenAL32/alFilter.c')
-rw-r--r--OpenAL32/alFilter.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/OpenAL32/alFilter.c b/OpenAL32/alFilter.c
index 1535dbce..c68a949a 100644
--- a/OpenAL32/alFilter.c
+++ b/OpenAL32/alFilter.c
@@ -59,8 +59,9 @@ AL_API ALvoid AL_APIENTRY alGenFilters(ALsizei n, ALuint *filters)
break;
}
- filter->filter = ALTHUNK_ADDENTRY(filter);
- err = InsertUIntMapEntry(&device->FilterMap, filter->filter, filter);
+ err = ALTHUNK_ADDENTRY(filter, &filter->filter);
+ if(err == AL_NO_ERROR)
+ err = InsertUIntMapEntry(&device->FilterMap, filter->filter, filter);
if(err != AL_NO_ERROR)
{
ALTHUNK_REMOVEENTRY(filter->filter);