From 3e5990275da1ea68a8e2bb0feae0bd3607b9ad53 Mon Sep 17 00:00:00 2001 From: triton Date: Tue, 9 Apr 2013 23:26:56 +0100 Subject: [PATCH] Check for null declarations in Desugar(). --- src/Bridge/Type.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Bridge/Type.cs b/src/Bridge/Type.cs index 8dcbaa8f..58740be0 100644 --- a/src/Bridge/Type.cs +++ b/src/Bridge/Type.cs @@ -100,8 +100,15 @@ namespace Cxxi public Type Desugar() { var type = this as TypedefType; + if (type != null) - return type.Declaration.QualifiedType.Type.Desugar(); + { + var decl = type.Declaration.Type; + + if (decl != null) + return decl.Desugar(); + } + return this; }