From: Lars Ingebrigtsen Date: Thu, 18 Mar 2021 07:33:40 +0000 (+0100) Subject: Make memory-report work with buffer-local unbound vars X-Git-Tag: emacs-28.0.90~3236 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=21e1a126b54390b5a22e5af836d14ae8f4e423fb;p=emacs.git Make memory-report work with buffer-local unbound vars * lisp/emacs-lisp/memory-report.el (memory-report--buffer-data): Protect against buffer-local unbound variables (bug#47057). --- diff --git a/lisp/emacs-lisp/memory-report.el b/lisp/emacs-lisp/memory-report.el index 3d6ca957e63..ecbca280e59 100644 --- a/lisp/emacs-lisp/memory-report.el +++ b/lisp/emacs-lisp/memory-report.el @@ -295,7 +295,7 @@ by counted more than once." (- (position-bytes (point-min))) (gap-size))) (seq-reduce #'+ (mapcar (lambda (elem) - (if (cdr elem) + (if (and (consp elem) (cdr elem)) (memory-report--object-size (make-hash-table :test #'eq) (cdr elem))