diff options
| author | Greg Clayton <gclayton@apple.com> | 2012-01-31 04:25:15 +0000 |
|---|---|---|
| committer | Greg Clayton <gclayton@apple.com> | 2012-01-31 04:25:15 +0000 |
| commit | ef496d5c4dcb642861edd1756ed3fbdcd0559eec (patch) | |
| tree | bca54dd345aaa2a55bfc38324b1b5152cdfd7980 | |
| parent | fe800031ec1439ef3e6f724663964c424023701d (diff) | |
| download | bcm5719-llvm-ef496d5c4dcb642861edd1756ed3fbdcd0559eec.tar.gz bcm5719-llvm-ef496d5c4dcb642861edd1756ed3fbdcd0559eec.zip | |
<rdar://problem/10776614>
Fixed an issue where we can crash if you call cast when the SBValue
doesn't contain a valid value.
llvm-svn: 149345
| -rw-r--r-- | lldb/source/API/SBValue.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lldb/source/API/SBValue.cpp b/lldb/source/API/SBValue.cpp index b72c8f181b8..96182e37428 100644 --- a/lldb/source/API/SBValue.cpp +++ b/lldb/source/API/SBValue.cpp @@ -377,7 +377,10 @@ SBValue::CreateChildAtOffset (const char *name, uint32_t offset, SBType type) lldb::SBValue SBValue::Cast (SBType type) { - return CreateChildAtOffset(m_opaque_sp->GetName().GetCString(), 0, type); + lldb::SBValue sb_value; + if (m_opaque_sp) + sb_value = CreateChildAtOffset(m_opaque_sp->GetName().GetCString(), 0, type); + return sb_value; } lldb::SBValue |

