[Lldb-commits] [lldb] r152087 - /lldb/trunk/source/Symbol/ClangASTType.cpp
Enrico Granata
egranata at apple.com
Mon Mar 5 17:28:31 PST 2012
Author: enrico
Date: Mon Mar 5 19:28:31 2012
New Revision: 152087
URL: http://llvm.org/viewvc/llvm-project?rev=152087&view=rev
Log:
Fixing a crasher bug where we were not checking for NULL before trying to retrieve the format for a type
Modified:
lldb/trunk/source/Symbol/ClangASTType.cpp
Modified: lldb/trunk/source/Symbol/ClangASTType.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTType.cpp?rev=152087&r1=152086&r2=152087&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/ClangASTType.cpp (original)
+++ lldb/trunk/source/Symbol/ClangASTType.cpp Mon Mar 5 19:28:31 2012
@@ -510,6 +510,9 @@
lldb::Format
ClangASTType::GetFormat (clang_type_t clang_type)
{
+ if (clang_type == NULL)
+ return lldb::eFormatDefault;
+
clang::QualType qual_type(clang::QualType::getFromOpaquePtr(clang_type));
switch (qual_type->getTypeClass())
More information about the lldb-commits
mailing list