[libclang] In cxtu::getASTUnit(), check for a null CXTranslationUnit.

llvm-svn: 179121
This commit is contained in:
Argyrios Kyrtzidis 2013-04-09 20:03:03 +00:00
parent e8d8288d7e
commit 2bee666540
1 changed files with 2 additions and 0 deletions

View File

@ -39,6 +39,8 @@ namespace cxtu {
CXTranslationUnitImpl *MakeCXTranslationUnit(CIndexer *CIdx, ASTUnit *AU);
static inline ASTUnit *getASTUnit(CXTranslationUnit TU) {
if (!TU)
return 0;
return TU->TheASTUnit;
}