Skip to content

Commit 64c7dff

Browse files
committed
[lldb] Only get child if m_storage and m_element_type is valid
This causes a crash because lldb-dap will check the first child to see if it is array like to lazy load the children.
1 parent ea291d0 commit 64c7dff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lldb/source/Plugins/Language/CPlusPlus/MsvcStlAtomic.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ llvm::Expected<uint32_t> lldb_private::formatters::
5050
lldb::ValueObjectSP
5151
lldb_private::formatters::MsvcStlAtomicSyntheticFrontEnd::GetChildAtIndex(
5252
uint32_t idx) {
53-
if (idx == 0)
53+
if (idx == 0 && m_storage && m_element_type.IsValid())
5454
return m_storage->Cast(m_element_type)->Clone(ConstString("Value"));
5555
return nullptr;
5656
}

0 commit comments

Comments
 (0)