Skip to content
This repository was archived by the owner on Jan 3, 2019. It is now read-only.

Commit 7da303c

Browse files
committed
fixed another NRE
1 parent 21109c9 commit 7da303c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

MonoDevelop.FSharpBinding/FSharpResolverProvider.fs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ type FSharpResolverProvider() =
4343

4444
let results =
4545
asyncMaybe {
46-
let! tyRes = languageService.GetTypedParseResultWithTimeout (doc.Project.FileName.ToString(), filename, 0, docText, AllowStaleResults.MatchingSource, obsoleteCheck=isObsolete)
46+
let projectFile = doc.Project |> function null -> filename | project -> project.FileName.ToString()
47+
let! tyRes = languageService.GetTypedParseResultWithTimeout (projectFile, filename, 0, docText, AllowStaleResults.MatchingSource, obsoleteCheck=isObsolete)
4748
LoggingService.LogDebug "ResolverProvider: Getting declaration location"
4849
// Get the declaration location from the language service
4950
let line, col, lineStr = doc.Editor.GetLineInfoFromOffset offset

0 commit comments

Comments
 (0)