summaryrefslogtreecommitdiff
path: root/src/gallium
diff options
context:
space:
mode:
authorTim Rowley <timothy.o.rowley@intel.com>2016-07-25 17:05:55 -0600
committerTim Rowley <timothy.o.rowley@intel.com>2016-08-04 14:38:34 -0500
commitf438b7ba8152dd5c70cbab6b79631338a800738e (patch)
tree6327ebde8d906d8a5a878977e224544c6d470007 /src/gallium
parent57b07498d239745c13d4b8db0e9bf32516a770c0 (diff)
swr: [rasterizer jitter] fix potential jit exit crash
Signed-off-by: Tim Rowley <timothy.o.rowley@intel.com>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp b/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp
index c6cbccf094a..6637cdd7619 100644
--- a/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp
+++ b/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp
@@ -352,6 +352,8 @@ void JitManager::DumpToFile(Function *f, const char *fileName)
extern "C"
{
+ bool g_DllActive = true;
+
//////////////////////////////////////////////////////////////////////////
/// @brief Create JIT context.
/// @param simdWidth - SIMD width to be used in generated program.
@@ -364,6 +366,9 @@ extern "C"
/// @brief Destroy JIT context.
void JITCALL JitDestroyContext(HANDLE hJitContext)
{
- delete reinterpret_cast<JitManager*>(hJitContext);
+ if (g_DllActive)
+ {
+ delete reinterpret_cast<JitManager*>(hJitContext);
+ }
}
}