From 462f27c129454b71179e0ebce366f3b8d7956da6 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sun, 16 Aug 2009 14:09:23 -0700 Subject: Use a function to retrieve the current context in an already-locked state This should help prevent race-conditions with a context being destroyed between breing retrieved and locked --- OpenAL32/alExtension.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'OpenAL32/alExtension.c') diff --git a/OpenAL32/alExtension.c b/OpenAL32/alExtension.c index 4c1c73b6..04d705b6 100644 --- a/OpenAL32/alExtension.c +++ b/OpenAL32/alExtension.c @@ -352,15 +352,13 @@ ALAPI ALboolean ALAPIENTRY alIsExtensionPresent(const ALchar *extName) return AL_FALSE; } - pContext = alcGetCurrentContext(); + pContext = GetContextSuspended(); if(!pContext) { alSetError(AL_INVALID_OPERATION); return AL_FALSE; } - SuspendContext(pContext); - len = strlen(extName); ptr = pContext->ExtensionList; while(ptr && *ptr) -- cgit v1.2.3