null check directory preview before sort

This commit is contained in:
Gokcehan 2018-04-20 22:19:37 +03:00
parent 3b043752a4
commit d267bc70d4

3
ui.go
View File

@ -450,6 +450,9 @@ func (ui *ui) renew() {
} }
func (ui *ui) sort() { func (ui *ui) sort() {
if ui.dirPrev == nil {
return
}
name := ui.dirPrev.name() name := ui.dirPrev.name()
ui.dirPrev.sort() ui.dirPrev.sort()
ui.dirPrev.find(name, ui.wins[0].h) ui.dirPrev.find(name, ui.wins[0].h)