aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/dirlist.go
diff options
context:
space:
mode:
authorKoni Marti <koni.marti@gmail.com>2022-11-07 22:31:23 +0100
committerRobin Jarry <robin@jarry.cc>2022-11-09 21:42:50 +0100
commit47a0f7d8e88ef47a127f42113e28f053c6ff04b8 (patch)
treeb89a85b6bf3b45e28413a7a450d08efbb25df068 /widgets/dirlist.go
parent650e00972d036014530594bbd781579166889a5e (diff)
downloadaerc-47a0f7d8e88ef47a127f42113e28f053c6ff04b8.tar.gz
dirtree: prevent panic when no folder is found
Prevent crash when no folder is found. Fixes: https://todo.sr.ht/~rjarry/aerc/100 Fixes: https://todo.sr.ht/~rjarry/aerc/101 Signed-off-by: Koni Marti <koni.marti@gmail.com> Tested-by: Inwit <inwit@sindominio.net>
Diffstat (limited to 'widgets/dirlist.go')
-rw-r--r--widgets/dirlist.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/widgets/dirlist.go b/widgets/dirlist.go
index 70550394..0f8431e9 100644
--- a/widgets/dirlist.go
+++ b/widgets/dirlist.go
@@ -131,7 +131,7 @@ func (dirlist *DirectoryList) UpdateList(done func(dirs []string)) {
dirlist.spinner.Stop()
dirlist.Invalidate()
if done != nil {
- done(dirs)
+ done(dirlist.dirs)
}
}
})