Browse Source

Fixed a crash with `TranslationUnit.FileName` property.

pull/1170/head
Joao Matos 7 years ago committed by Dimitar Dobrev
parent
commit
1953f8f61f
  1. 2
      src/AST/TranslationUnit.cs

2
src/AST/TranslationUnit.cs

@ -39,7 +39,7 @@ namespace CppSharp.AST
/// Contains the name of the file. /// Contains the name of the file.
public string FileName public string FileName
{ {
get { return fileName ?? (fileName = Path.GetFileName(FilePath)); } get { return !IsValid ? FilePath : fileName ?? (fileName = Path.GetFileName(FilePath)); }
} }
/// Contains the name of the module. /// Contains the name of the module.

Loading…
Cancel
Save