Skip to content

Commit de0aa7f

Browse files
committed
[lldb] Add missing null check in TaskSyntheticFrontEnd::Update
rdar://140949272
1 parent 065b571 commit de0aa7f

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
@@ -805,6 +805,8 @@ class TaskSyntheticFrontEnd : public SyntheticChildrenFrontEnd {
805805
ThreadSafeReflectionContext reflection_ctx =
806806
runtime->GetReflectionContext();
807807
ValueObjectSP task_obj_sp = m_backend.GetChildMemberWithName("_task");
808+
if (!task_obj_sp)
809+
return ChildCacheState::eRefetch;
808810
uint64_t task_ptr = task_obj_sp->GetValueAsUnsigned(LLDB_INVALID_ADDRESS);
809811
if (task_ptr != LLDB_INVALID_ADDRESS) {
810812
llvm::Expected<ReflectionContextInterface::AsyncTaskInfo> task_info =

0 commit comments

Comments
 (0)