aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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)
{