Skip to content

Commit 9765245

Browse files
authored
[lldb] Fix use of null shared pointer (#10708)
1 parent e59566a commit 9765245

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lldb/source/Plugins/Language/Swift/SwiftFormatters.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1136,8 +1136,10 @@ class CheckedContinuationSyntheticFrontEnd : public SyntheticChildrenFrontEnd {
11361136
m_task_sp = ValueObject::CreateValueObjectFromAddress(
11371137
"task", task_addr, m_backend.GetExecutionContextRef(),
11381138
m_task_type, false);
1139-
if (auto synthetic_sp = m_task_sp->GetSyntheticValue())
1140-
m_task_sp = synthetic_sp;
1139+
1140+
if (m_task_sp)
1141+
if (auto synthetic_sp = m_task_sp->GetSyntheticValue())
1142+
m_task_sp = synthetic_sp;
11411143
return ChildCacheState::eRefetch;
11421144
}
11431145

0 commit comments

Comments
 (0)