From dfb87d616b51e7b90c7bc4a5cf14a8cfe0aa9c33 Mon Sep 17 00:00:00 2001 From: Sean Callanan Date: Tue, 9 Apr 2013 21:30:48 +0000 Subject: Hardening so we won't crash if an Objective-C interface doesn't have a corresponding type. llvm-svn: 179130 --- lldb/source/Expression/ClangExpressionDeclMap.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lldb/source/Expression/ClangExpressionDeclMap.cpp') diff --git a/lldb/source/Expression/ClangExpressionDeclMap.cpp b/lldb/source/Expression/ClangExpressionDeclMap.cpp index 04ab1660a07..00724b49e59 100644 --- a/lldb/source/Expression/ClangExpressionDeclMap.cpp +++ b/lldb/source/Expression/ClangExpressionDeclMap.cpp @@ -2893,6 +2893,9 @@ ClangExpressionDeclMap::FindExternalVisibleDecls (NameSearchContext &context, return; const clang::Type *interface_type = self_interface->getTypeForDecl(); + + if (!interface_type) + return; // This is unlikely, but we have seen crashes where this occurred TypeFromUser class_user_type(QualType(interface_type, 0).getAsOpaquePtr(), &method_decl->getASTContext()); -- cgit v1.2.3