1
0
mirror of https://github.com/golang/go synced 2024-11-18 18:44:42 -07:00

internal/lsp: fix panic when file deleted

Change-Id: I6eb7e5ae7fb9de74d5a3fb42031adb4e933d99d8
Reviewed-on: https://go-review.googlesource.com/c/tools/+/181680
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
Reviewed-by: Ian Cottrell <iancottrell@google.com>
This commit is contained in:
Rebecca Stambler 2019-06-11 17:56:24 -04:00
parent 6050b95026
commit 3c1b0c2805

View File

@ -143,7 +143,7 @@ func (imp *importer) parseFiles(filenames []string, ignoreFuncBodies bool) ([]*a
// Eliminate nils, preserving order.
var o int
for _, f := range parsed {
if f != nil {
if f.file != nil {
parsed[o] = f
o++
}