From 13198f8f9f634d8d281147a712d5efefb5824420 Mon Sep 17 00:00:00 2001 From: Chad Rosier Date: Wed, 25 Jul 2012 19:06:29 +0000 Subject: You cannot call removeModule on a JIT with no modules. Patch by Verena Beckham . Reviewed by Jim Grosbach. llvm-svn: 160753 --- llvm/lib/ExecutionEngine/JIT/JIT.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/ExecutionEngine/JIT') diff --git a/llvm/lib/ExecutionEngine/JIT/JIT.cpp b/llvm/lib/ExecutionEngine/JIT/JIT.cpp index a942299f3bb..a54ee3b87bc 100644 --- a/llvm/lib/ExecutionEngine/JIT/JIT.cpp +++ b/llvm/lib/ExecutionEngine/JIT/JIT.cpp @@ -361,7 +361,7 @@ bool JIT::removeModule(Module *M) { MutexGuard locked(lock); - if (jitstate->getModule() == M) { + if (jitstate && jitstate->getModule() == M) { delete jitstate; jitstate = 0; } -- cgit v1.2.3