Skip to content

Commit

Permalink
Enable handling without error such cases, where BaseType == null
Browse files Browse the repository at this point in the history
  • Loading branch information
cyborgyn committed Oct 13, 2021
1 parent 1a9cfe8 commit 2a73440
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions IL2C.Core/Writers/TypeWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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,
Expand All @@ -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);
Expand Down

0 comments on commit 2a73440

Please sign in to comment.