Work in progress for:

rdar://problem/10577182
Audit lldb API impl for places where we need to perform a NULL check

Add a NULL check for SBValue.CreateValueFromExpression().


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@146954 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/API/SBValue.cpp b/source/API/SBValue.cpp
index 876670a..654336d 100644
--- a/source/API/SBValue.cpp
+++ b/source/API/SBValue.cpp
@@ -392,8 +392,11 @@
                                                                          true, // keep in memory
                                                                          eNoDynamicValues,
                                                                          result_valobj_sp);
-        result_valobj_sp->SetName(ConstString(name));
-        result = SBValue(result_valobj_sp);
+        if (result_valobj_sp)
+        {
+            result_valobj_sp->SetName(ConstString(name));
+            result = SBValue(result_valobj_sp);
+        }
     }
     LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
     if (log)