Make the error return more explicit when an SBValue has no value.

llvm-svn: 251722
This commit is contained in:
Jim Ingham 2015-10-30 21:43:15 +00:00
parent 8731ad72aa
commit d612918367
1 changed files with 3 additions and 0 deletions

View File

@ -1425,7 +1425,10 @@ lldb::ValueObjectSP
SBValue::GetSP (ValueLocker &locker) const
{
if (!m_opaque_sp || !m_opaque_sp->IsValid())
{
locker.GetError().SetErrorString("No value");
return ValueObjectSP();
}
return locker.GetLockedSP(*m_opaque_sp.get());
}