From 50bd564d06af3f4a787129884ea8561e4160af46 Mon Sep 17 00:00:00 2001 From: Rene Gollent Date: Tue, 25 Dec 2012 16:54:56 -0500 Subject: [PATCH] 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. --- src/apps/debugger/debug_info/DwarfTypeFactory.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/apps/debugger/debug_info/DwarfTypeFactory.cpp b/src/apps/debugger/debug_info/DwarfTypeFactory.cpp index 527e500d0a..ed28f8820c 100644 --- a/src/apps/debugger/debug_info/DwarfTypeFactory.cpp +++ b/src/apps/debugger/debug_info/DwarfTypeFactory.cpp @@ -576,8 +576,9 @@ printf(" -> failed to add type to cache\n"); = dynamic_cast(_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 {