Skip to content

Commit 042b2a6

Browse files
committed
[LLDB] Fix std::shared_ptr formatter crash on windows
1 parent 69f2ff3 commit 042b2a6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ LibStdcppSharedPtrSyntheticFrontEnd::CalculateNumChildren() {
379379

380380
lldb::ValueObjectSP
381381
LibStdcppSharedPtrSyntheticFrontEnd::GetChildAtIndex(uint32_t idx) {
382-
if (idx == 0)
382+
if (idx == 0 && m_ptr_obj)
383383
return m_ptr_obj->GetSP();
384384
if (idx == 1) {
385385
if (m_ptr_obj && !m_obj_obj) {

0 commit comments

Comments
 (0)