From 4393b6b05fc06ed1eaabd583ce91f45f8eefb5b7 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sun, 29 Jan 2012 22:49:17 -0800 Subject: Only initialize the default reverb effect when a slot is available --- Alc/ALc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Alc') diff --git a/Alc/ALc.c b/Alc/ALc.c index dfdece10..acb11733 100644 --- a/Alc/ALc.c +++ b/Alc/ALc.c @@ -2263,7 +2263,8 @@ ALC_API ALCcontext* ALC_APIENTRY alcCreateContext(ALCdevice *device, const ALCin } while(!CompExchangePtr((XchgPtr*)&device->ContextList, ALContext->next, ALContext)); UnlockLists(); - InitializeEffect(ALContext, device->DefaultSlot, &ForcedEffect); + if(device->DefaultSlot) + InitializeEffect(ALContext, device->DefaultSlot, &ForcedEffect); ALContext->LastError = AL_NO_ERROR; ALCdevice_DecRef(device); -- cgit v1.2.3