aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-03-30 23:30:15 -0700
committerChris Robinson <[email protected]>2019-03-30 23:30:15 -0700
commit89210cddb754ab714f2fb02570293290cd2ac065 (patch)
treea913fcf5d9d53833241c7e776235a826ee78f644 /Alc
parentcc91490b6104b5304655c6e4367371ea929d20bb (diff)
Don't stop the backend if it's not running
Diffstat (limited to 'Alc')
-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;