aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2012-01-20 12:53:41 -0800
committerChris Robinson <[email protected]>2012-01-20 12:53:41 -0800
commite52e4b1a8c2dbf4db4717ce188e9bfd79c27a723 (patch)
treebae2230f6142b70201860bf496633444d6434309
parent0ef3a30b84759c3a1e9046fe790b02f845cbdedb (diff)
Not all devices will have a default effect slot
-rw-r--r--Alc/ALc.c7
1 files changed, 5 insertions, 2 deletions
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)
{