aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALc.c
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/ALc.c')
-rw-r--r--Alc/ALc.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index 8f15b155..8f0da230 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -1006,6 +1006,8 @@ ALCAPI ALCvoid ALCAPIENTRY alcDestroyContext(ALCcontext *context)
{
ALCcontext **list;
+ InitAL();
+
// Lock context list
SuspendContext(NULL);
@@ -1051,6 +1053,8 @@ ALCAPI ALCcontext * ALCAPIENTRY alcGetCurrentContext(ALCvoid)
{
ALCcontext *pContext = NULL;
+ InitAL();
+
SuspendContext(NULL);
pContext = g_pContextList;
@@ -1072,6 +1076,8 @@ ALCAPI ALCdevice* ALCAPIENTRY alcGetContextsDevice(ALCcontext *pContext)
{
ALCdevice *pDevice = NULL;
+ InitAL();
+
SuspendContext(NULL);
if (IsContext(pContext))
pDevice = pContext->Device;
@@ -1093,6 +1099,8 @@ ALCAPI ALCboolean ALCAPIENTRY alcMakeContextCurrent(ALCcontext *context)
ALCcontext *ALContext;
ALboolean bReturn = AL_TRUE;
+ InitAL();
+
SuspendContext(NULL);
// context must be a valid Context or NULL