diff options
author | Lluis Sanchez <lluis@xamarin.com> | 2019-09-18 10:54:11 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-18 10:54:11 +0300 |
commit | 3fa695b264c4b362c7e86e633152c65bb0ee0bdd (patch) | |
tree | 5f7454c3365d5a6ca430af1c4f05979147c9f7b8 /main | |
parent | 8cd3d4fb791c91d328669a8ed691f8de6328888d (diff) | |
parent | 58ed05d3515e4ccbae468be397c3c6a67efcfd6f (diff) |
Merge pull request #8756 from mono/fix-984699
[F#] Fix LanguageService exception
Diffstat (limited to 'main')
-rw-r--r-- | main/external/fsharpbinding/MonoDevelop.FSharpBinding/Services/FileService.fs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/main/external/fsharpbinding/MonoDevelop.FSharpBinding/Services/FileService.fs b/main/external/fsharpbinding/MonoDevelop.FSharpBinding/Services/FileService.fs index ec6db23f23..9448ad7c49 100644 --- a/main/external/fsharpbinding/MonoDevelop.FSharpBinding/Services/FileService.fs +++ b/main/external/fsharpbinding/MonoDevelop.FSharpBinding/Services/FileService.fs @@ -16,8 +16,11 @@ type FileSystem (defaultFileSystem : IFileSystem, openDocuments: unit -> Documen let getOpenDocContent (filename: string) = match getOpenDoc filename with | Some d -> - let bytes = System.Text.Encoding.UTF8.GetBytes (d.Editor.Text) - Some bytes + match d.Editor with + | null -> None + | editor -> + let bytes = System.Text.Encoding.UTF8.GetBytes (editor.Text) + Some bytes | _ -> None static member IsAScript fileName = |