[Lldb-commits] [lldb] r180663 - Fixed a crash when we tried dyn_cast<>ing a

Sean Callanan scallanan at apple.com
Fri Apr 26 18:57:44 PDT 2013


Author: spyffe
Date: Fri Apr 26 20:57:44 2013
New Revision: 180663

URL: http://llvm.org/viewvc/llvm-project?rev=180663&view=rev
Log:
Fixed a crash when we tried dyn_cast<>ing a
null pointer.

<rdar://problem/13745684>

Modified:
    lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp

Modified: lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp?rev=180663&r1=180662&r2=180663&view=diff
==============================================================================
--- lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp (original)
+++ lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp Fri Apr 26 20:57:44 2013
@@ -1328,6 +1328,9 @@ ClangExpressionDeclMap::FindExternalVisi
                     {
                         clang::DeclContext *decl_ctx = sym_ctx.function->GetClangDeclContext();
                         
+                        if (!decl_ctx)
+                            continue;
+                        
                         // Filter out class/instance methods.
                         if (dyn_cast<clang::ObjCMethodDecl>(decl_ctx))
                             continue;





More information about the lldb-commits mailing list