Browse Source

Fixed a crash when there are parsing errors.

Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
pull/1011/head
Dimitar Dobrev 8 years ago
parent
commit
fd73bef752
  1. 2
      src/Generator/Driver.cs

2
src/Generator/Driver.cs

@ -147,7 +147,7 @@ namespace CppSharp @@ -147,7 +147,7 @@ namespace CppSharp
sourceFile, parserOptions))
if (Context.TargetInfo == null)
Context.TargetInfo = result.TargetInfo;
else
else if (result.TargetInfo != null)
result.TargetInfo.Dispose();
if (string.IsNullOrEmpty(ParserOptions.TargetTriple))
ParserOptions.TargetTriple = parserOptions.TargetTriple;

Loading…
Cancel
Save