From 2a73440babcf1c633dea895c559d78144ae0efd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barnab=C3=A1s=20Vir=C3=A1gh?= Date: Wed, 13 Oct 2021 20:14:19 +0200 Subject: [PATCH] Enable handling without error such cases, where BaseType == null --- IL2C.Core/Writers/TypeWriter.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/IL2C.Core/Writers/TypeWriter.cs b/IL2C.Core/Writers/TypeWriter.cs index 74e5f8cd..89c7428a 100644 --- a/IL2C.Core/Writers/TypeWriter.cs +++ b/IL2C.Core/Writers/TypeWriter.cs @@ -98,7 +98,7 @@ public static void WriteTypeDefinitions( tw.WriteLine( "// [1-2-3] {0} VTable layout (Derived from {1})", declaredType.MemberTypeName, - declaredType.BaseType.FriendlyName); + declaredType.BaseType?.FriendlyName); } tw.WriteLine( @@ -276,7 +276,7 @@ public static void WriteTypeDefinitions( { tw.WriteLine( "// [1-5-1] VTable (Same as {0})", - declaredType.BaseType.FriendlyName); + declaredType.BaseType?.FriendlyName); tw.WriteLine( "#define {0}_VTABLE__ {1}_VTABLE__", declaredType.MangledUniqueName, @@ -287,7 +287,7 @@ public static void WriteTypeDefinitions( { tw.WriteLine( "// [1-5-2] VTable (Derived from {0})", - declaredType.BaseType.FriendlyName); + declaredType.BaseType?.FriendlyName); tw.WriteLine( "extern {0}_VTABLE_DECL__ {0}_VTABLE__;", declaredType.MangledUniqueName);