Fix segfault on :select-message for unloaded messages
Signed-off-by: Tom Lebreux <tomlebreux@cock.li>
This commit is contained in:
parent
2925bdfd6c
commit
6e11a020d4
1 changed files with 3 additions and 0 deletions
|
@ -29,6 +29,9 @@ func SelectMessage(aerc *widgets.Aerc, args []string) error {
|
||||||
if acct == nil {
|
if acct == nil {
|
||||||
return errors.New("No account selected")
|
return errors.New("No account selected")
|
||||||
}
|
}
|
||||||
|
if acct.Messages().Empty() {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
acct.Messages().Select(n)
|
acct.Messages().Select(n)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue