Browse Source

Removed a null check for the module of a unit.

Each unit has a module, if it doesn't, it's a bug.

Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
pull/778/head 0.8.5
Dimitar Dobrev 9 years ago
parent
commit
f9fdacb512
  1. 2
      src/Generator/Generators/CSharp/CSharpTypePrinter.cs

2
src/Generator/Generators/CSharp/CSharpTypePrinter.cs

@ -673,7 +673,7 @@ namespace CppSharp.Generators.CSharp @@ -673,7 +673,7 @@ namespace CppSharp.Generators.CSharp
}
var unit = ctx.TranslationUnit;
if (!unit.IsSystemHeader && unit.IsValid && unit.Module != null &&
if (!unit.IsSystemHeader && unit.IsValid &&
!string.IsNullOrWhiteSpace(unit.Module.OutputNamespace))
names.Push(unit.Module.OutputNamespace);

Loading…
Cancel
Save