diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2021-03-21 09:12:51 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2021-03-30 21:57:00 +1100 |
commit | d2b65537f69346a013601da5ad5da06d44ce1f10 (patch) | |
tree | 87e0a80985a94834528aea8b15b90b631648cba8 /pkg | |
parent | 1183f68e19d26a63293cfab1650a59f3b90a844b (diff) |
handle nothing selected
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/gui/files_panel.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/pkg/gui/files_panel.go b/pkg/gui/files_panel.go index 4ac212045..cb6c1945d 100644 --- a/pkg/gui/files_panel.go +++ b/pkg/gui/files_panel.go @@ -525,6 +525,9 @@ func (gui *Gui) refreshStateFiles() error { selectedNode := gui.getSelectedStatusNode() getPaths := func(node *models.StatusLineNode) []string { + if node == nil { + return nil + } if node.File != nil && node.File.IsRename() { return node.File.Names() } else { |