aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/alc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/alc.cpp')
-rw-r--r--Alc/alc.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Alc/alc.cpp b/Alc/alc.cpp
index 5904dc71..d779e199 100644
--- a/Alc/alc.cpp
+++ b/Alc/alc.cpp
@@ -3508,7 +3508,7 @@ ALC_API ALCvoid ALC_APIENTRY alcDestroyContext(ALCcontext *context)
if(ALCdevice *Device{ctx->Device})
{
std::lock_guard<std::mutex> _{Device->StateLock};
- if(!ReleaseContext(ctx.get(), Device))
+ if(!ReleaseContext(ctx.get(), Device) && (Device->Flags&DEVICE_RUNNING))
{
Device->Backend->stop();
Device->Flags &= ~DEVICE_RUNNING;