From 607d13121c9787ed0922f430acb73b194731528d Mon Sep 17 00:00:00 2001 From: Dave Lee Date: Sun, 5 Apr 2026 08:31:55 -0700 Subject: [PATCH] [lldb] Fix potential null deref in TypeSystemSwiftTypeRef::GetNodeForPrintingImpl --- lldb/source/Plugins/TypeSystem/Swift/TypeSystemSwiftTypeRef.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lldb/source/Plugins/TypeSystem/Swift/TypeSystemSwiftTypeRef.cpp b/lldb/source/Plugins/TypeSystem/Swift/TypeSystemSwiftTypeRef.cpp index 8b63059b5ba5b..bf2251795c40b 100644 --- a/lldb/source/Plugins/TypeSystem/Swift/TypeSystemSwiftTypeRef.cpp +++ b/lldb/source/Plugins/TypeSystem/Swift/TypeSystemSwiftTypeRef.cpp @@ -2022,7 +2022,7 @@ swift::Demangle::NodePointer TypeSystemSwiftTypeRef::GetNodeForPrintingImpl( NodePointer module = nullptr; if (node->getChild(0)->getNumChildren() > 1) module = node->getChild(0)->getChild(0); - if (module->getKind() != Node::Kind::Module) + if (!module || module->getKind() != Node::Kind::Module) break; canonical->addChild(module, dem);