diff options
| author | Johnny Chen <johnny.chen@apple.com> | 2011-12-20 01:52:44 +0000 |
|---|---|---|
| committer | Johnny Chen <johnny.chen@apple.com> | 2011-12-20 01:52:44 +0000 |
| commit | 50660440a192a5769e63ff41bff27423c374c98f (patch) | |
| tree | 597eddda852f94c5df9f4811cdad084c524b616b /lldb/source/API | |
| parent | 0ffc31c55b0981c4d15e6da2387035938f19ab26 (diff) | |
| download | bcm5719-llvm-50660440a192a5769e63ff41bff27423c374c98f.tar.gz bcm5719-llvm-50660440a192a5769e63ff41bff27423c374c98f.zip | |
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().
llvm-svn: 146954
Diffstat (limited to 'lldb/source/API')
| -rw-r--r-- | lldb/source/API/SBValue.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lldb/source/API/SBValue.cpp b/lldb/source/API/SBValue.cpp index 876670a510c..654336db8c5 100644 --- a/lldb/source/API/SBValue.cpp +++ b/lldb/source/API/SBValue.cpp @@ -392,8 +392,11 @@ SBValue::CreateValueFromExpression (const char *name, const char* expression) 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) |

