From d2b65537f69346a013601da5ad5da06d44ce1f10 Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Sun, 21 Mar 2021 09:12:51 +1100 Subject: [PATCH] handle nothing selected --- pkg/gui/files_panel.go | 3 +++ 1 file changed, 3 insertions(+) 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 {