From b303fa6df40dbe9c88ab223ec38e1e461c4286f8 Mon Sep 17 00:00:00 2001 From: triton Date: Sun, 10 Mar 2013 23:17:23 +0000 Subject: [PATCH] Check if the type is null. --- src/Generator/Types/CppTypePrinter.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Generator/Types/CppTypePrinter.cs b/src/Generator/Types/CppTypePrinter.cs index a3b2ca29..fe2526ac 100644 --- a/src/Generator/Types/CppTypePrinter.cs +++ b/src/Generator/Types/CppTypePrinter.cs @@ -93,7 +93,12 @@ namespace Cxxi.Types public string VisitTypedefType(TypedefType typedef, TypeQualifiers quals) { - return typedef.Declaration.Type.Visit(this); + var decl = typedef.Declaration; + + if (decl.Type == null) + return string.Empty; + + return decl.Type.Visit(this); } public string VisitTemplateSpecializationType(TemplateSpecializationType template, TypeQualifiers quals)