Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLluis Sanchez <lluis@xamarin.com>2019-09-18 10:54:11 +0300
committerGitHub <noreply@github.com>2019-09-18 10:54:11 +0300
commit3fa695b264c4b362c7e86e633152c65bb0ee0bdd (patch)
tree5f7454c3365d5a6ca430af1c4f05979147c9f7b8 /main/external
parent8cd3d4fb791c91d328669a8ed691f8de6328888d (diff)
parent58ed05d3515e4ccbae468be397c3c6a67efcfd6f (diff)
Merge pull request #8756 from mono/fix-984699
[F#] Fix LanguageService exception
Diffstat (limited to 'main/external')
-rw-r--r--main/external/fsharpbinding/MonoDevelop.FSharpBinding/Services/FileService.fs7
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 =