diff --git a/lldb/source/API/SBValue.cpp b/lldb/source/API/SBValue.cpp index 6a558800db71..a8584c5d38c9 100644 --- a/lldb/source/API/SBValue.cpp +++ b/lldb/source/API/SBValue.cpp @@ -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()); }