Browse Source

Fix crash with null template

pull/1904/head
duckdoom5 4 months ago
parent
commit
720d22b0bc
  1. 2
      src/Generator/Generators/CodeGenerator.cs

2
src/Generator/Generators/CodeGenerator.cs

@ -1317,7 +1317,7 @@ namespace CppSharp.Generators
if (@class != specialization) if (@class != specialization)
template = template.Classes.FirstOrDefault(c => c.Name == @class.Name); template = template.Classes.FirstOrDefault(c => c.Name == @class.Name);
if (template.HasDependentValueFieldInLayout()) if (template?.HasDependentValueFieldInLayout() ?? false)
{ {
if (specialization.Arguments.All( if (specialization.Arguments.All(
a => a.Type.Type?.IsAddress() == true)) a => a.Type.Type?.IsAddress() == true))

Loading…
Cancel
Save