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:
parent
6050b95026
commit
3c1b0c2805
|
@ -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++
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue