[Lldb-commits] [lldb] r219886 - Check that process is non-null before calling a method in it.

Jason Molenda jmolenda at apple.com
Wed Oct 15 18:23:06 PDT 2014


Author: jmolenda
Date: Wed Oct 15 20:23:06 2014
New Revision: 219886

URL: http://llvm.org/viewvc/llvm-project?rev=219886&view=rev
Log:
Check that process is non-null before calling a method in it.
clang static analyzer fixit.

Modified:
    lldb/trunk/source/Expression/ClangUserExpression.cpp

Modified: lldb/trunk/source/Expression/ClangUserExpression.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ClangUserExpression.cpp?rev=219886&r1=219885&r2=219886&view=diff
==============================================================================
--- lldb/trunk/source/Expression/ClangUserExpression.cpp (original)
+++ lldb/trunk/source/Expression/ClangUserExpression.cpp Wed Oct 15 20:23:06 2014
@@ -1070,7 +1070,7 @@ ClangUserExpression::Evaluate (Execution
                                                              user_expression_sp,
                                                              expr_result);
 
-            if (options.GetResultIsInternal())
+            if (options.GetResultIsInternal() && process)
             {
                 process->GetTarget().GetPersistentVariables().RemovePersistentVariable (expr_result);
             }





More information about the lldb-commits mailing list