From d267bc70d4fcdebdbb2c02c31a0e3ebcb2126931 Mon Sep 17 00:00:00 2001 From: Gokcehan Date: Fri, 20 Apr 2018 22:19:37 +0300 Subject: [PATCH] null check directory preview before sort --- ui.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ui.go b/ui.go index fd43df5..1b1bf5d 100644 --- a/ui.go +++ b/ui.go @@ -450,6 +450,9 @@ func (ui *ui) renew() { } func (ui *ui) sort() { + if ui.dirPrev == nil { + return + } name := ui.dirPrev.name() ui.dirPrev.sort() ui.dirPrev.find(name, ui.wins[0].h)