Fix crash issue with some cases of template types.

- If a template type parameter resolves to a void type, gcc doesn't
  actually generate a type attribute for the instantiation, leading
  to a crash in CreateType(). Was observable with MemoryDeleter and
  others.
This commit is contained in:
Rene Gollent 2012-12-25 16:54:56 -05:00
parent a74c82b977
commit 50bd564d06
1 changed files with 3 additions and 2 deletions

View File

@ -576,8 +576,9 @@ printf(" -> failed to add type to cache\n");
= dynamic_cast<DIETemplateTypeParameter*>(_typeEntry);
DwarfType* templateType;
if (templateTypeEntry != NULL) {
if (CreateType(templateTypeEntry->GetType(), templateType)
!= B_OK) {
if (templateTypeEntry->GetType() == NULL
|| CreateType(templateTypeEntry->GetType(),
templateType) != B_OK) {
continue;
}
} else {