From e52e4b1a8c2dbf4db4717ce188e9bfd79c27a723 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Fri, 20 Jan 2012 12:53:41 -0800 Subject: Not all devices will have a default effect slot --- Alc/ALc.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'Alc') diff --git a/Alc/ALc.c b/Alc/ALc.c index e0cb3efc..6ce5efaf 100644 --- a/Alc/ALc.c +++ b/Alc/ALc.c @@ -1302,8 +1302,11 @@ static ALCvoid FreeDevice(ALCdevice *device) { TRACE("%p\n", device); - ALeffectState_Destroy(device->DefaultSlot->EffectState); - device->DefaultSlot->EffectState = NULL; + if(device->DefaultSlot) + { + ALeffectState_Destroy(device->DefaultSlot->EffectState); + device->DefaultSlot->EffectState = NULL; + } if(device->BufferMap.size > 0) { -- cgit v1.2.3