@ -71,7 +71,7 @@ namespace CppSharp.Generators
if (!unit.IsGenerated || !unit.HasDeclarations)
continue;
if (unit.IsSystemHeader)
if (unit.IsSystemHeader || !unit.IsValid)
var templates = Generate(unit);
@ -18,9 +18,12 @@ namespace CppSharp.Passes
// Try to get an include path that works from the original include
// directories paths.
unit.IncludePath = GetIncludePath(unit.FilePath);
return true;
if (unit.IsValid)
{
}
return false;
string GetIncludePath(string filePath)