mirror of
https://git.sr.ht/~rjarry/aerc
synced 2025-10-13 20:05:15 +02:00
![]() If you start aerc with mouse mode activated and you happen to touch the mouse, you might encounter this crash [1]. The problem is that if the grid has not been drawn yet, reflow has not been called, hence {row,column}Layout is nil, and we crash accessing their elements. There might be ways to better synchronize things (?), but the easiest is to simply ignore mouse events if {row,column}Layout is nil; this is what this patch does. [1] panic: runtime error: slice bounds out of range [:2] with capacity 0 goroutine 1 [running]: git.sr.ht/~rjarry/aerc/lib/log.PanicHandler() git.sr.ht/~rjarry/aerc/lib/log/panic-logger.go:51 +0x6cf panic({0xc8c660?, 0xc001914000?}) runtime/panic.go:792 +0x132 git.sr.ht/~rjarry/aerc/lib/ui.(*Grid).MouseEvent(0xc000162090, 0x63, 0x16, {0xc9ac60?, 0xc000414440?}) git.sr.ht/~rjarry/aerc/lib/ui/grid.go:144 +0x5a6 git.sr.ht/~rjarry/aerc/app.(*AccountView).MouseEvent(0x142db50?, 0xcd1640?, 0xc0000478f0?, {0xc9ac60?, 0xc000414440?}) git.sr.ht/~rjarry/aerc/app/account.go:192 +0x25 [...] Signed-off-by: Simon Martin <simon@nasilyan.com> Acked-by: Robin Jarry <robin@jarry.cc> |
||
---|---|---|
.. | ||
auth | ||
autoconfig | ||
calendar | ||
crypto | ||
format | ||
hooks | ||
ipc | ||
iterator | ||
jwz | ||
log | ||
marker | ||
notmuch | ||
pama | ||
parse | ||
pinentry | ||
rfc822 | ||
send | ||
sort | ||
state | ||
templates | ||
ui | ||
watchers | ||
xdg | ||
attachment.go | ||
dirstore.go | ||
dirstore_test.go | ||
emlview.go | ||
history.go | ||
keepalive_dummy.go | ||
keepalive_linux.go | ||
messageview.go | ||
msgstore.go | ||
notmuch_version.go | ||
notmuch_version_dummy.go | ||
oauthbearer.go | ||
open.go | ||
structure_helpers.go | ||
structure_helpers_test.go | ||
threadbuilder.go | ||
xoauth2.go |