mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-12 12:55:47 +02:00
fix issue when switching repos while files refresh
This commit is contained in:
parent
c9ded489c9
commit
267da3b4db
2 changed files with 14 additions and 2 deletions
|
@ -111,7 +111,13 @@ func (node *CommitFileNode) GetNodeAtIndex(index int, collapsedPaths map[string]
|
|||
return nil
|
||||
}
|
||||
|
||||
return getNodeAtIndex(node, index, collapsedPaths).(*CommitFileNode)
|
||||
result := getNodeAtIndex(node, index, collapsedPaths)
|
||||
if result == nil {
|
||||
// not sure how this can be nil: we probably are missing a mutex somewhere
|
||||
return nil
|
||||
}
|
||||
|
||||
return result.(*CommitFileNode)
|
||||
}
|
||||
|
||||
func (node *CommitFileNode) GetIndexForPath(path string, collapsedPaths map[string]bool) (int, bool) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue