diff -ur mutt-1.6.0-orig/imap/imap.c mutt-1.6.0/imap/imap.c --- mutt-1.6.0-orig/imap/imap.c 2016-04-02 19:12:22.000000000 +0100 +++ mutt-1.6.0/imap/imap.c 2016-04-18 14:08:01.016584276 +0100 @@ -1125,7 +1125,7 @@ if (!idata->ctx) return -1; - if (!mutt_bit_isset (idata->ctx->rights, right)) + if (!idata->ctx || !mutt_bit_isset (idata->ctx->rights, right)) return 0; if (right == M_ACL_WRITE && !imap_has_flag (idata->flags, name))