Don't crash if we don't have a type system for a language.

llvm-svn: 245121
This commit is contained in:
Greg Clayton 2015-08-14 23:15:48 +00:00
parent 7332e0455f
commit 360dac7d58
1 changed files with 1 additions and 1 deletions

View File

@ -598,7 +598,7 @@ SymbolFileDWARF::GetTypeSystemForLanguage (LanguageType language)
{
TypeSystem *type_system = m_obj_file->GetModule()->GetTypeSystemForLanguage (language);
if (type_system->AsClangASTContext())
if (type_system && type_system->AsClangASTContext())
{
// Get the ClangAST so that we register the ClangExternalASTSource callbacks if needed...
GetClangASTContext();