Skip to content

Commit dccb030

Browse files
committed
[lldb] Add missing null check in TaskSyntheticFrontEnd::Update
rdar://140949272 (cherry-picked from commit de0aa7f)
1 parent 97b35c8 commit dccb030

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -807,6 +807,8 @@ class TaskSyntheticFrontEnd : public SyntheticChildrenFrontEnd {
807807
ThreadSafeReflectionContext reflection_ctx =
808808
runtime->GetReflectionContext();
809809
ValueObjectSP task_obj_sp = m_backend.GetChildMemberWithName("_task");
810+
if (!task_obj_sp)
811+
return ChildCacheState::eRefetch;
810812
uint64_t task_ptr = task_obj_sp->GetValueAsUnsigned(LLDB_INVALID_ADDRESS);
811813
if (task_ptr != LLDB_INVALID_ADDRESS) {
812814
llvm::Expected<ReflectionContextInterface::AsyncTaskInfo> task_info =

0 commit comments

Comments
 (0)