Added checking to make sure that the target has a
scratch AST context before attempting to parse.

llvm-svn: 136631
diff --git a/lldb/source/Expression/ClangUtilityFunction.cpp b/lldb/source/Expression/ClangUtilityFunction.cpp
index aec3088..72c6888 100644
--- a/lldb/source/Expression/ClangUtilityFunction.cpp
+++ b/lldb/source/Expression/ClangUtilityFunction.cpp
@@ -103,7 +103,11 @@
     
     m_data_allocator.reset(new ProcessDataAllocator(*exe_ctx.process));
     
-    m_expr_decl_map->WillParse(exe_ctx);
+    if (!m_expr_decl_map->WillParse(exe_ctx))
+    {
+        error_stream.PutCString ("error: current process state is unsuitable for expression parsing\n");
+        return false;
+    }
         
     ClangExpressionParser parser(exe_ctx.GetBestExecutionContextScope(), *this);