From 3feef0428dad1e847d250d949248907ad31669dc Mon Sep 17 00:00:00 2001 From: Christophe Troestler Date: Fri, 21 Aug 2020 13:31:38 +0200 Subject: [PATCH] Fix displaying inline ical attachments with no charset * lisp/gnus/gnus-icalendar.el (gnus-icalendar-with-decoded-handle): Check whether there is a charset before using it (bug#40290). Copyright-paperwork-exempt: yes --- lisp/gnus/gnus-icalendar.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/gnus/gnus-icalendar.el b/lisp/gnus/gnus-icalendar.el index 29d3e30780f..ab121f1f9ed 100644 --- a/lisp/gnus/gnus-icalendar.el +++ b/lisp/gnus/gnus-icalendar.el @@ -757,7 +757,7 @@ These will be used to retrieve the RSVP information from ical events." `(let ((,charset (cdr (assoc 'charset (mm-handle-type ,handle))))) (with-temp-buffer (mm-insert-part ,handle) - (when (string= (downcase ,charset) "utf-8") + (when (and ,charset (string= (downcase ,charset) "utf-8")) (decode-coding-region (point-min) (point-max) 'utf-8)) ,@body)))) -- 2.39.2