aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Jarry <robin@jarry.cc>2023-06-14 16:18:28 +0200
committerRobin Jarry <robin@jarry.cc>2023-08-05 00:07:21 +0200
commit7452eda95eab5a91622f2d19ee51d4a88bdea0a7 (patch)
tree787b6777dc253ba6ec7cb20d0c5963d046a3c7ef
parent2788078187c21e1713cbb86368ea4d91b2823bae (diff)
downloadaerc-7452eda95eab5a91622f2d19ee51d4a88bdea0a7.tar.gz
aerc-7452eda95eab5a91622f2d19ee51d4a88bdea0a7.zip
msgstore: segfault
Signed-off-by: Robin Jarry <robin@jarry.cc>
-rw-r--r--lib/msgstore.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/msgstore.go b/lib/msgstore.go
index a29ff139..7ba3d612 100644
--- a/lib/msgstore.go
+++ b/lib/msgstore.go
@@ -633,6 +633,9 @@ func (store *MessageStore) UidsIterator() iterator.Iterator {
}
func (store *MessageStore) Selected() *models.MessageInfo {
+ if store.Messages == nil {
+ return nil
+ }
return store.Messages[store.selectedUid]
}