<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
This commit is contained in:
Greg Clayton
2012-01-31 04:25:15 +00:00
parent fe800031ec
commit ef496d5c4d

View File

@@ -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