aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/alError.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-04-10 13:05:21 -0700
committerChris Robinson <[email protected]>2019-04-10 13:05:21 -0700
commitf39d4598b7dedfca92fc6bcb4eedf646656db7b3 (patch)
tree4532654cc17feefea0d6d132a906e56937e2631b /OpenAL32/alError.cpp
parentd6f72b777a058f3feb42eb109b0baf66070c0528 (diff)
Add exception protection to some AL functions
Diffstat (limited to 'OpenAL32/alError.cpp')
-rw-r--r--OpenAL32/alError.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/OpenAL32/alError.cpp b/OpenAL32/alError.cpp
index 2c2a80eb..324f4c1b 100644
--- a/OpenAL32/alError.cpp
+++ b/OpenAL32/alError.cpp
@@ -32,6 +32,7 @@
#include "alMain.h"
#include "alcontext.h"
#include "alError.h"
+#include "alexcpt.h"
ALboolean TrapALError = AL_FALSE;
@@ -80,6 +81,7 @@ void alSetError(ALCcontext *context, ALenum errorCode, const char *msg, ...)
}
AL_API ALenum AL_APIENTRY alGetError(void)
+START_API_FUNC
{
ContextRef context{GetContextRef()};
if(UNLIKELY(!context))
@@ -100,3 +102,4 @@ AL_API ALenum AL_APIENTRY alGetError(void)
return context->LastError.exchange(AL_NO_ERROR);
}
+END_API_FUNC