aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/alcEcho.c
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/alcEcho.c')
-rw-r--r--Alc/alcEcho.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/Alc/alcEcho.c b/Alc/alcEcho.c
index 7185e125..deaae622 100644
--- a/Alc/alcEcho.c
+++ b/Alc/alcEcho.c
@@ -26,6 +26,7 @@
#include "alMain.h"
#include "alFilter.h"
#include "alAuxEffectSlot.h"
+#include "alError.h"
#include "alu.h"
typedef struct ALechoState {
@@ -160,7 +161,10 @@ ALeffectState *EchoCreate(ALCcontext *Context)
state = malloc(sizeof(*state));
if(!state)
+ {
+ alSetError(AL_OUT_OF_MEMORY);
return NULL;
+ }
state->state.Destroy = EchoDestroy;
state->state.Update = EchoUpdate;
@@ -176,6 +180,7 @@ ALeffectState *EchoCreate(ALCcontext *Context)
if(!state->SampleBuffer)
{
free(state);
+ alSetError(AL_OUT_OF_MEMORY);
return NULL;
}